diff options
Diffstat (limited to 'src/login/logind.c')
-rw-r--r-- | src/login/logind.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/login/logind.c b/src/login/logind.c index e22f68d237..14c83551b9 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -1506,6 +1506,26 @@ int manager_startup(Manager *m) { return 0; } +static int manager_recheck_buttons(Manager *m) { + Iterator i; + Button *b; + int r = 0; + + assert(m); + + HASHMAP_FOREACH(b, m->buttons, i) { + int q; + + q = button_recheck(b); + if (q > 0) + return 1; + if (q < 0) + r = q; + } + + return r; +} + int manager_run(Manager *m) { assert(m); @@ -1519,6 +1539,9 @@ int manager_run(Manager *m) { if (manager_dispatch_delayed(m) > 0) continue; + if (manager_recheck_buttons(m) > 0) + continue; + if (dbus_connection_dispatch(m->bus) != DBUS_DISPATCH_COMPLETE) continue; |