diff options
| author | srdusr <[email protected]> | 2024-08-25 21:34:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2024-08-25 21:34:00 +0200 |
| commit | 4fb537aa4cfe52e364dbcd9a97078f0206ada54b (patch) | |
| tree | 0c52e284fde884a20596ef0b3fda6df511a62526 /legacy-cpp/scripts | |
| parent | adc1a56982c70c06a0f8549c2c1b3bddd17930c2 (diff) | |
| download | srdwm-4fb537aa4cfe52e364dbcd9a97078f0206ada54b.tar.gz srdwm-4fb537aa4cfe52e364dbcd9a97078f0206ada54b.zip | |
Fix global-menu source misclassification for appmenu-gtk-module's shim
read_global_menu unconditionally preferred MenuSource::Gtk whenever a
GTK menubar path resolved - but appmenu-gtk-module exports a plain
Gtk.Window's menu (no GtkApplication, so no _GTK_APPLICATION_OBJECT_
PATH/_GTK_WINDOW_OBJECT_PATH) through its Unity-compatibility shim,
unity.-prefixed actions and all, while still setting _GTK_MENUBAR_
OBJECT_PATH. Labeling that Gtk meant a consumer inserted app/win
action groups the app never populated instead of a unity one it did --
every menu item rendered, but permanently insensitive, since none of
them resolved against a group that existed. This was flagged as a
known risk in this function's own doc comment when `source` was first
added, but the priority logic itself never got the fix.
Root-caused live by an AGS peer session: read the actual exported menu
content off the bus for a real appmenu-gtk-module app and found
unity.-prefixed actions at the GTK atom's own path, with app_path/
window_path both empty - confirming that emptiness is the reliable
tell, not which atom happened to resolve.
Fixed by preferring Unity whenever app_path/window_path are both
absent, even if a GTK menubar path resolved - the path itself doesn't
change, only the label. Pulled the decision out into a standalone
classify_menu_source function so it's unit-testable without a real X
connection, with the exact live case as a regression test.
Diffstat (limited to 'legacy-cpp/scripts')
0 files changed, 0 insertions, 0 deletions