Last time I tried to fix the "delay on logout" I did an incomplete job. ( See Bug #13726 ) Currently there is no delay if only the daemon is running, but there still is a 8sec. delay on logout if any thunar window remains open. Calling "g_application_quit ()" instead of "gtk_main_quit ()" in "thunar_application_quit" fixes the issue, however this will ignore any "g_application_hold" which possibly got set by "thunar_application_process_files". So not a very nice fix, since it possibly could interrupt an ongoing file operation, causing data loss. As well calling g_application_release() before "gtk_main_quit ()" fixes the issue .. howerver this is very strange, since g_application_hold() was not called before by thunar. --> possibly g_application_hold called by gtk3 itself for some reason ? --> Gtk3 DOc says: For example, g_application_hold() is called by GTK+ when a toplevel window is on the screen. I'll further investigate the issue, and see if there is a better fix than "g_application_quit()"
Created attachment 8214 patch Attached a first patch. The reason for the trouble seems to be, that "shutdown" of the GApplication is not called. If we call it "by hand", there is no delay on logout any more. However that is just a cure of the symptoms .. better would be to figure out why "shutdown" is not called in the first place.
Created attachment 8218 improved fix Here an improved fix. If I close all open thunar windows before exit, thunar does not hangup any more and thunar_application_shutdown is called correctly. I am not sure why this is necesarry (IMO it should not be needed) .. however it fixes the bug, so for me the patch looks good to get pushed.
Created attachment 8219 fixed 2 warnings
Alexander Schwinn referenced this bugreport in commit 331cf3e5a68aa8cda52477e3cfbc84d646752088 Still 8sec delay on logout when there is an open thunar window (Bug #15008) https://git.xfce.org/xfce/thunar/commit?id=331cf3e5a68aa8cda52477e3cfbc84d646752088
Alexander Schwinn referenced this bugreport in commit 69f73f181316589d580b14947427aad8f39fec9a Still 8sec delay on logout when there is an open thunar window (Bug #15008) https://git.xfce.org/xfce/thunar/commit?id=69f73f181316589d580b14947427aad8f39fec9a
Fixed for master and 4.14 branch. WIll be released in thunar 1.8.3