Skip to content

feat: implement xdg-dialog-v1 protocol support#1051

Open
wineee wants to merge 1 commit into
linuxdeepin:masterfrom
wineee:xdg-dialog
Open

feat: implement xdg-dialog-v1 protocol support#1051
wineee wants to merge 1 commit into
linuxdeepin:masterfrom
wineee:xdg-dialog

Conversation

@wineee

@wineee wineee commented Jun 24, 2026

Copy link
Copy Markdown
Member

Add native wlroots-based xdg-dialog-v1 integration across the stack:

qwlroots:

  • Add qwxdgdialogv1.h: QW_CLASS_OBJECT bindings for wlr_xdg_wm_dialog_v1 and wlr_xdg_dialog_v1, exposing notify_new_dialog, notify_set_modal, and before_destroy signals

waylib:

  • Add WXdgDialogManagerV1: WServerInterface wrapping wlr_xdg_wm_dialog_v1
    • Handles new_dialog events, syncs initial modal state, tracks set_modal/unset_modal via notify_set_modal signal
    • Resets modal on before_destroy (fires before wlroots frees memory, so nativeDialog->modal is safe to read)
    • Emits surfaceModalChanged(WXdgToplevelSurface*, bool) signal
  • Add modal property to WXdgToplevelSurface (Q_PROPERTY + setModal/modal)
  • Add lcWlXdgDialog logging category to wayliblogging

treeland:

  • Add modal property to SurfaceWrapper for QML observation
  • Attach WXdgDialogManagerV1 in Helper::init(), connect surfaceModalChanged to propagate modal state to both WXdgToplevelSurface and SurfaceWrapper

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @wineee, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wineee

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wineee wineee force-pushed the xdg-dialog branch 5 times, most recently from 74786e5 to d4a2a42 Compare June 25, 2026 05:13
Comment thread src/seat/helper.cpp Outdated
Comment thread qwlroots/src/types/qwxdgdialogv1.h Outdated
@wineee wineee force-pushed the xdg-dialog branch 7 times, most recently from c42a901 to 85df15f Compare June 25, 2026 13:13
@deepin-bot

deepin-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 0.8.13
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1063

@wineee wineee force-pushed the xdg-dialog branch 3 times, most recently from 8fc9a00 to e8b06d9 Compare June 29, 2026 08:11
@wineee wineee marked this pull request as ready for review June 29, 2026 08:18

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @wineee, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@wineee wineee force-pushed the xdg-dialog branch 2 times, most recently from f997c5f to ec04078 Compare June 29, 2026 09:20
Add xdg-dialog-v1 protocol support (qwxdgdialogv1 wrapper +
wxdgdialogmanagerv1 handler) so clients can mark surfaces as modal
dialogs via the new Wayland protocol.

Implement KWin-style asymmetric modal policy:
- Minimizing a parent hides non-modal children but keeps modal dialogs
  visible; minimizing a modal dialog pulls its parent along
- Moving a surface to another workspace drags its transient children
  and (for modal dialogs) its parent; surfaces pinned to all workspaces
  are skipped to preserve their "show everywhere" intent

TASK: 391997
@wineee wineee requested review from Groveer and zccrs June 30, 2026 03:08
text: qsTr("Move to Left Work Space")
enabled: leftWorkspaceId >= 0
onTriggered: Helper.workspace.moveSurfaceTo(surface, leftWorkspaceId)
onTriggered: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对齐

text: qsTr("Move to Right Work Space")
enabled: rightWorkspaceId >= 0
onTriggered: Helper.workspace.moveSurfaceTo(surface, rightWorkspaceId)
onTriggered: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants