glib-aux: fix priority for nm_g_idle_add_source()

nm_g_idle_add_source() is supposed to work like g_idle_add(). Use the correct
priority.

I think this causes little actual problems, because usually we don't
carefully tune the priorities and would be mostly fine with either.

Fixes: 6b18fc252d ('shared: add nm_g_{idle,timeout}_add_source() helpers')
(cherry picked from commit 15e8837945)
This commit is contained in:
Thomas Haller 2022-03-08 20:53:38 +01:00
parent 34225cccc5
commit 156bb80bef
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1789,7 +1789,7 @@ nm_g_idle_add_source(GSourceFunc func, gpointer user_data)
/* A convenience function to attach a new timeout source to the default GMainContext.
* In that sense it's very similar to g_idle_add() except that it returns a
* reference to the new source. */
return nm_g_source_attach(nm_g_idle_source_new(G_PRIORITY_DEFAULT, func, user_data, NULL),
return nm_g_source_attach(nm_g_idle_source_new(G_PRIORITY_DEFAULT_IDLE, func, user_data, NULL),
NULL);
}