Always quit after the final sync ends #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t3code/fix-window-close-quit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closing the Adwaita window with pending changes (or with a sync in flight) hides the window and leaves quitting entirely to the final syncs completion handler: it destroys the window only when the last upload settles.
That handler can miss its destroy in several ways, and each left the process running invisibly with no windows:
On top of that the closing wait had no deadline: a slow final upload can keep the process alive for minutes after the window is gone, which reads as the app not quitting.
This change arms a watchdog the moment closing starts. It destroys the hidden window as soon as nothing is in flight that releasepath, and no later than two minutes after the close. When the deadline fires mid-upload the application quits explicitly, since the running sync still holds it: the upload stays pending and is picked up on the next launch.
Verified against a virtual X11 display with a real close event: