mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
systray: Make sure systray is actually embedded before we keep app running.
This commit is contained in:
parent
d8e8430285
commit
48cc0a33d9
@ -401,7 +401,7 @@ class vmmEngine(gobject.GObject):
|
||||
self.windows -= 1
|
||||
logging.debug("window counter decremented to %s" % self.windows)
|
||||
# Don't exit if system tray is enabled
|
||||
if self.windows <= 0 and not self.config.get_view_system_tray() :
|
||||
if self.windows <= 0 and not self.systray.is_visible():
|
||||
self.exit_app()
|
||||
|
||||
def exit_app(self):
|
||||
|
@ -70,6 +70,11 @@ class vmmSystray(gobject.GObject):
|
||||
self.config.on_view_system_tray_changed(self.show_systray)
|
||||
self.show_systray()
|
||||
|
||||
def is_visible(self):
|
||||
return (self.config.get_view_system_tray() and
|
||||
self.systray_icon and
|
||||
self.systray_icon.is_embedded())
|
||||
|
||||
# Initialization routines
|
||||
|
||||
def init_systray_menu(self):
|
||||
|
Loading…
Reference in New Issue
Block a user