Closed guihkx closed 1 year ago
Sorry for the extra push
, I had to make the comments I added a bit more accurate there.
Alrighty. The system tray isn't very consistent yet, but it's ok for now.
I see that system tray is not default on macOS. What about other operating systems?
I see that system tray is not default on macOS.
Well, technically there is a system tray icon on macOS, and it's enabled by default...
What we don't there have is a system tray context menu.
What about other operating systems?
On non-macOS, we have both a system tray icon and context menu.
Oh okay, I probably had the settings off before testing already hah.
Thanks for the fixes, @guihkx!
Thanks!
I don't know how I messed up this badly, but these changes were merged.
Bug 1:
Closing the window on macOS merely hides the app to the dock. However, because Qt is never informed of this, it will still think its window is visible when we try to restore it, requiring the user to click on the tray icon twice, for example.
We fix this by monitoring AppKit's
hide
/unhide
notifications (events), and then we simply call Qt'shide()
/show()
methods, accordingly.Fixes #458
Bug 2:
This is still related to bug 1: Clicking on the tray icon will call Qt's
hide()
/show()
methods, but AppKit is also never informed of this.So, we listen to Qt's
showEvent
/hideEvent
and then we simply call AppKit'shide:
/unhide:
methods, accordingly.Unfortunately, this does not seem to work every time, for some reason.
But I'd argue that's still better than not doing anything...🤷