eivindveg / HotSUploader

JavaFX-based Replay Uploader for Heroes of the Storm
Apache License 2.0
185 stars 36 forks source link

Minimize to tray #16

Closed allanjackson closed 9 years ago

allanjackson commented 9 years ago

It would be really nice if we could minimize the Mac application to the menu bar instead of having it remain in the dock.

zhedar commented 9 years ago

I guess this is great example of the 80:20 rule and a great time sink. CMD + H works, but CMD + Q really needs to close the application instead of minimizing it. That's actually the only thing, where all applications on OS X behave the same (because CMD + Q != pressing x). Currently on CMD + Q the app will just minimize and then hang.

Now we only got the preloader dialog, but I guess this is a different issue?

eivindveg commented 9 years ago

Does the application hang when closing it through the tray icon? If so, that's a different issue, and the Platform.exit() ghost is still there.

zhedar commented 9 years ago

Can't check immediately, my uploader currently crashes everytime I reach 9 new replays, need to check what file it is hanging on. Also will test, if it's going to work with #67 .

zhedar commented 9 years ago

Platform.exit() actually can't work, if there are uploads in the queue, because there are still threads in the background, doesn't it? I will recheck with the profiler, what happens on that occasion. But for me everything just hangs and Client.stop() isn't called at all.

eivindveg commented 9 years ago

Those threads are managed by JavaFX and should be interrupted by the platform. Platform.exit() is kind of critical now, since we need to flush the database on exit; this isn't done on System.exit()

zhedar commented 9 years ago

It's the AWT thread, that is blocking again. If I remove the TrayIcon now, things close fine. According to the profiler, everything is shut down properly after calling Platform.exit(), except the AWT thread. I assume it's safe, that we call System.exit(), after JavaFX cleared everything up to close the remaining event threads in a safely manner. Don't you have these issues on windows?

eivindveg commented 9 years ago

To be clear; do we consider this issue closed once #70 has been integrated properly?

zhedar commented 9 years ago

We should close it for now, but should consider getting rid of AWT in the future and maybe really hide the dock icon. But there's nothing we can do at the moment. Closing this with #70 seems appropriate.

eivindveg commented 9 years ago

Closed by 72e1a767677d7a2e08f84babc7d349b2b4e23719