Draft
Conversation
Co-authored-by: AlanGriffiths <9048879+AlanGriffiths@users.noreply.github.com> Agent-Logs-Url: https://github.com/canonical/mir/sessions/57869bba-f1af-4bf3-b578-8b9ba38da6fa
Copilot
AI
changed the title
[WIP] Implement xdg-dialog protocol for window management
Implement xdg-dialog-v1 Wayland protocol
Mar 23, 2026
TICS Quality Gate✔️ Passedmir
|
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the staging xdg-dialog-v1 Wayland protocol in Mir’s Wayland frontend, mapping xdg_dialog_v1 to Mir’s mir_window_type_dialog so toolkits (e.g. GTK4) can reliably mark toplevels as dialogs.
Changes:
- Added the
xdg-dialog-v1protocol XML and hooked it into Mir’s protocol-wrapper generation. - Implemented
xdg_wm_dialog_v1/xdg_dialog_v1handling in the Wayland frontend, setting the toplevel window type tomir_window_type_dialogand enforcing one dialog object per toplevel (per manager). - Enabled the new global by default via Wayland’s default extension configuration and build system wiring.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wayland-protocols/xdg-dialog-v1.xml | Adds the upstream protocol definition for xdg_wm_dialog_v1 and xdg_dialog_v1. |
| src/wayland/CMakeLists.txt | Generates Mir Wayland wrappers for xdg-dialog-v1.xml. |
| src/server/frontend_wayland/xdg_dialog_v1.h | Declares the extension factory for xdg_wm_dialog_v1. |
| src/server/frontend_wayland/xdg_dialog_v1.cpp | Implements the protocol objects and maps dialogs to mir_window_type_dialog. |
| src/server/frontend_wayland/CMakeLists.txt | Adds the new implementation files to the Wayland frontend build. |
| src/server/frontend_wayland/wayland_default_configuration.cpp | Registers xdg_wm_dialog_v1 and includes it in the standard extension set. |
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.
Implements the
xdg-dialog-v1staging Wayland protocol, which maps cleanly onto Mir'smir_window_type_dialogwindow management type.What's new?
wayland-protocols/xdg-dialog-v1.xml— Protocol definition:xdg_wm_dialog_v1global manager andxdg_dialog_v1per-toplevel object withset_modal/unset_modalrequestssrc/server/frontend_wayland/xdg_dialog_v1.{h,cpp}— Implementation:get_xdg_dialogsets the associated toplevel's type tomir_window_type_dialogalready_usedon duplicate)set_modal/unset_modalare intentional no-ops —mir_window_type_dialogalready encapsulates modal dialog semantics in Mirshared_ptr<ToplevelsWithDialogs>captured in destroy listeners, matching the pattern inxdg_decoration_unstable_v1src/wayland/CMakeLists.txt— Adds wrapper code generation for the new XMLsrc/server/frontend_wayland/CMakeLists.txt— Adds new source fileswayland_default_configuration.cpp— Registersxdg_wm_dialog_v1as a standard (default-enabled) extensionHow to test
Build Mir and run a Wayland client that uses
xdg_wm_dialog_v1(e.g. GTK4 apps use this protocol). Verify the window is treated as a dialog by the window manager.Alternatively, use
wayland-infoto confirmxdg_wm_dialog_v1is advertised as a global.Checklist
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
gitlab.freedesktop.org/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.