! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Still 8sec delay on logout when there is an open thunar window
Status:
RESOLVED: FIXED

Comments

Description alexxcons editbugs 2019-01-01 22:49:49 CET
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()"
Comment 1 alexxcons editbugs 2019-01-01 23:39:21 CET
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.
Comment 2 alexxcons editbugs 2019-01-02 23:36:25 CET
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.
Comment 3 alexxcons editbugs 2019-01-03 00:01:13 CET
Created attachment 8219 
fixed 2 warnings
Comment 4 Git Bot editbugs 2019-01-05 19:38:51 CET
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
Comment 5 Git Bot editbugs 2019-01-05 19:39:30 CET
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
Comment 6 alexxcons editbugs 2019-01-05 19:40:32 CET
Fixed for master and 4.14 branch. WIll be released in thunar 1.8.3

Bug #15008

Reported by:
alexxcons
Reported on: 2019-01-01
Last modified on: 2019-01-05

People

Assignee:
alexxcons
CC List:
2 users

Version

Attachments

patch (931 bytes, patch)
2019-01-01 23:39 CET , alexxcons
no flags
improved fix (2.56 KB, patch)
2019-01-02 23:36 CET , alexxcons
no flags
fixed 2 warnings (2.52 KB, patch)
2019-01-03 00:01 CET , alexxcons
no flags

Additional information