-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
widgets: fall back to Xwayland #234
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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): | |||||
_('<b>Qubes Domains</b>\nView and manage running domains.')) | ||||||
|
||||||
self.tray_menu = Gtk.Menu() | ||||||
self.widget_icon.connect('focus-out-event', self.hide_menu) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
this change to be exact, looks like it does not break anything on X at least. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also this would still require some sort of hacky "hide if visible" modification to the show_menu function, otherwise I can get it funnily stuck on X There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On our first test it does not work correctly at all in Wayland (the menu does not hide). Probably some other event? Or something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe this is a direction to go to? https://stackoverflow.com/a/3687273 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nvm, looks like another thing that is broken under Wayland |
||||||
|
||||||
self.icon_cache = IconCache() | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work if you connect it to the self.tray_menu, but I only tested it on X, not on Wayland.