diff --git a/qui/tray/domains.py b/qui/tray/domains.py index 1eae1310..8205884f 100644 --- a/qui/tray/domains.py +++ b/qui/tray/domains.py @@ -524,6 +524,10 @@ def update_stats(self, memory_kb, cpu_usage): class DomainTray(Gtk.Application): ''' A tray icon application listing all but halted domains. ” ''' + def hide_menu(self, _unused_event): + self.tray_menu.hide() + return False + def __init__(self, app_name, qapp, dispatcher, stats_dispatcher): super().__init__() self.qapp = qapp @@ -537,6 +541,7 @@ def __init__(self, app_name, qapp, dispatcher, stats_dispatcher): _('Qubes Domains\nView and manage running domains.')) self.tray_menu = Gtk.Menu() + self.widget_icon.connect('focus-out-event', self.hide_menu) self.icon_cache = IconCache()