1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

systray: Withdraw window when oniconify() called

NB: Currently this doesn't work for the Default theme as its 'iconify'
doesn't go through this function.
This commit is contained in:
Athanasius 2021-11-12 13:37:45 +00:00
parent 4d069cb406
commit ac824ceb13
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -1751,6 +1751,11 @@ class AppWindow(object):
self.w.overrideredirect(False) # Can't iconize while overrideredirect
self.w.iconify()
self.w.update_idletasks() # Size and windows styles get recalculated here
# If we're meant to "minimize to system tray" then hide the window so no taskbar icon is seen
if config.get_bool('minimize_system_tray'):
self.w.withdraw()
self.w.wait_visibility() # Need main window to be re-created before returning
theme.active = None # So theme will be re-applied on map