Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
First step toward issue #832 (global application menus on Wayland). This PR adds two Wayland protocol XMLs into
protocols/and wires them into the meson build. My plan is to raise follow up PRs to build on top of this :org_kde_kwin_appmenuserver-side: store per-Clientstate, register the global.gtk_shell1server-side. Same shape.dwl-ipc-unstable-v2to interface version 3, add a single newappmenuevent carrying both protocols' fields, expose them viammsg -M, with backwards-compatible versions so old panels keep working.Files in this PR
protocols/kde-appmenu.xml(new) — verbatim copy fromplasma-wayland-protocols, MIT licensed. Provenance + SPDX header inline.
protocols/gtk-shell.xml(new) — trimmed subset of GTK's gtk-shell.xml,LGPL-2.1-or-later. Provenance + trim notes inline.
protocols/meson.build— appends the two filenames towayland_xmls.Why the GTK XML is trimmed
Upstream
gtk-shell.xmldeclares bothgtk_shell1andgtk_surface1at version 7. The vast majority of that surface area is unrelated to menus — tiled-state CSD hints (v2), focus-stealing bypass (v3), titlebar gestures (v5), accessibility paths (v7), startup notification (v3), etc. Each would require a stub handler in the compositor.To keep the implementation surface area minimal, this XML declares both interfaces at version 1, retaining only what's needed for menu publication:
gtk_shell1:get_gtk_surface,capabilitieseventgtk_surface1:set_dbus_propertiesplus the other v1 requests that must remain for opcode alignment with the upstream wire format (
set_startup_id,system_bell,set_modal,unset_modal,present).Verification
meson setup build && meson compile -C buildsucceeds — wayland-scanner generateskde-appmenu-protocol.{c,h}andgtk-shell-protocol.{c,h}with no warnings.xmllint --noout).mmsg -goutput is unchanged frommain.