Seems like calling `AppWindow.close()` calls Syste...
# compose-desktop
a
Seems like calling
AppWindow.close()
calls System.exit() or something, and process exits immediately, anyway to stop that (still closing the window, but not let process die)?
k
So you want the app to continue running in the background but not display any UI? That's a pretty hostile action to take against your user who just told you to close the app. I hate such apps (looking at you, Skype) that pretend to exit but continue running in the background.
🤔 1
☝️ 1
a
App necessarily has to be UI only? cleanup before closing the window (probably will make window exit slower)..
👍 1
k
If you have some sort of a persistent service / daemon running in the background all the time, that's not related to Compose. Cleaning up before closing the window is a separate question, so perhaps you can be a little bit more clear on the exact scenario you have in mind.
a
Want to have sort of minimized app, maybe freeing the UI resources when not in use blob thinking upside down, invoking the window back from some other source.
I'm just experimenting with different stuffs tbh 😅
k
Well, you need to be specific about such scenarios. Swing has clear meaning on what happens when the last visible window is closed if DISPOSE_ON_CLOSE is used. And there's the
windowClosing
callback for cleaning up. But if you want to leave your daemon running in the background, that's a completely different area.
a
Well wait, even this slack seems to run in background and doesn't exit...
Even discord and other daemon services like download managers, 👀.
s
I think there are many good reasons why an App developer might want to continue the process in such cases 👀
4
k
Depends if Compose (or Skiko?) wants to be in the business of such things as background services and daemons on the desktop. I fully expect the red / close button on my mac to close the window and exit the app. Slack is bad. Slack goes to the dock, but that is what the minimize semaphore button is for.
a
Well X (or Ctrl+W) is for closing the slack, and
File -> Quit
(or Ctrl+Q) is for quitting the app.
It still enhances the experience sometimes, as redrawing and connecting to the socket may take upto 5-6 sec (atleast for me :P)
k
Sorry, this is not going anywhere productive for me, so I'm going to check out
👀 2