DRAFT: proof of concept for global menus #2569
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially addresses #2367
This is a draft so far, since the functionality is very basic and only works for GTK3 apps. I would eventually prefer exposing this via the
wlr-foreign-toplevel-management
protocol.So far, this allows reporting the DBus properties set by gtk-shell to IPC clients (new event:
view-gtk-dbus-properties-changed
).So far I've included an example client that displays the menus of the active app:
wf_gtk_global_menu.py
(once this PR is closer to ready, I'd move this to a separate repo, or open a separate PR in pywayfire).Currently, this only works with GTK3 apps. To use this:
appmenu-gtk3-module
python3 wf_gtk_global_menu.py
(it needs to start before any app whose menu to show)GTK_MODULES=appmenu-gtk-module
Next steps:
wlr-foreign-toplevel-management
protocol (similar to this) to make using this easier for panels without relying on Wayfire's IPCapp_menu_path
,menubar_path
, etc.) so they can be reported for already running apps as well