Closed incanus closed 1 year ago
On second thought, this would also accomplish the same thing as #8 since the post-tab-closing delay would also see a remaining window after the tab close.
Looks like onebadidea has stopped updating this app. @incanus Is there anyway, I could download the fixes you applied? I am not a programmer, so it has to be compiled app.
There are a multitude of ways to accomplish this, but I thought this one was the simplest.
The current code checks in
closeApplication()
that the app in question has "one window", which really means that it just closed its last window.The new code just uses the same app object that received the window destroy event (passing it) and checks it after two seconds to make sure it doesn't have any windows now. This allows the user to, say, reopen a window for the app after closing the last one, as long as it is inside of two seconds.
Two seconds seems fair to avoid any problems with, say, re-launching a manually quit app.
This also requires removing
@objc
fromcloseApplication()
, where it's not clear why that was there in the first place anyway.