mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +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
|
self.windows -= 1
|
||||||
logging.debug("window counter decremented to %s" % self.windows)
|
logging.debug("window counter decremented to %s" % self.windows)
|
||||||
# Don't exit if system tray is enabled
|
# 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()
|
self.exit_app()
|
||||||
|
|
||||||
def exit_app(self):
|
def exit_app(self):
|
||||||
|
@ -70,6 +70,11 @@ class vmmSystray(gobject.GObject):
|
|||||||
self.config.on_view_system_tray_changed(self.show_systray)
|
self.config.on_view_system_tray_changed(self.show_systray)
|
||||||
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
|
# Initialization routines
|
||||||
|
|
||||||
def init_systray_menu(self):
|
def init_systray_menu(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user