logout while on g_application_hold



Hi all,

I have some questions regarding GtkApplication and triggering on logout.

If g_application_hold
<https://developer.gnome.org/gio/stable/GApplication.html#g-application-hold> ()
is active on my GtkApplication, a user-logout will experience a ~8
second delay (until OS gets the application killed).

I am not sure why this is the case for me, neither I am able to
reproduce it on a simple GtkApplication yet. ( Here a link to my
application: thunar gtk3-port <https://github.com/andreldm/thunar>)

Currently I can fix the problem by using g_unix_signal_add()
<https://developer.gnome.org/glib/stable/glib-UNIX-specific-utilities-and-integration.html#g-unix-signal-add>
in order to listen to the SIGHUP signal and calling
g_application_release()
<https://developer.gnome.org/gio/stable/GApplication.html#g-application-release>
in the handler --> no delay at all on logout.


However my current solution is not very clean, neither is it portable.

So I searched the gtk+ bugzilla and found a feature, added 2012
<https://bugzilla.gnome.org/show_bug.cgi?id=667610>, which offers
exactly what I need (a signal on logout).

But it seems like the current API of GtkApplication has no "
quit-requested" signal any more. Maybe the patch got reverted ? Do you
know anything on that ?

Possibly you as well noticed such delays on logout for your applications
while on hold ? Could it be some bug in gtk+ ?

I am currently using libgtk-3 version 3.22.11.

Thanks in advance & Cheers,

Alex






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]