Skip to content

wl_surface: don't propagate commit to ext if ext has changed since commit#1117

Merged
mahkoh merged 3 commits into
masterfrom
jorth/surface-ext-versioning
Jul 19, 2026
Merged

wl_surface: don't propagate commit to ext if ext has changed since commit#1117
mahkoh merged 3 commits into
masterfrom
jorth/surface-ext-versioning

Conversation

@mahkoh

@mahkoh mahkoh commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Closes #1103

Copilot AI review requested due to automatic review settings July 19, 2026 21:36
github-actions[bot]
github-actions Bot previously approved these changes Jul 19, 2026

Copilot AI 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.

Pull request overview

This PR introduces versioning for wl_surface extension objects so that commit/unmap callbacks are only forwarded to the extension that was active when the commit was recorded, addressing issue #1103 (avoiding compositor-side dismissal signals like popup_done() for client-destroyed popups).

Changes:

  • Add ext_version tracking on WlSurface and propagate it through PendingState and queued Commit entries.
  • Gate before_apply_commit, after_apply_commit, and timeline-driven unmap so they only run when pending.ext_version matches the current surface ext_version.
  • Refactor multiple role installers (xdg/layer/input-popup/tray/session-lock) to attach extensions via a new WlSurface::set_ext(...) helper.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ifs/wl_surface/zwp_input_popup_surface_v2.rs Switch to centralized set_ext role+ext attachment.
src/ifs/wl_surface/zwlr_layer_surface_v1.rs Switch to centralized set_ext role+ext attachment.
src/ifs/wl_surface/xdg_surface.rs Switch to centralized set_ext role+ext attachment.
src/ifs/wl_surface/wl_subsurface.rs Use set_ext_unchecked (now bumps ext_version) when attaching subsurface ext.
src/ifs/wl_surface/tray.rs Switch to centralized set_ext role+ext attachment.
src/ifs/wl_surface/ext_session_lock_surface_v1.rs Switch to centralized set_ext role+ext attachment.
src/ifs/wl_surface/commit_timeline.rs Store ext_version per queued commit and use it for versioned unmap.
src/ifs/wl_surface.rs Add ext_version, version-gated ext callbacks, and set_ext/set_ext_unchecked helpers plus HasExt error.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ifs/wl_surface.rs
@witchlliee

Copy link
Copy Markdown
Contributor

It does indeed fixes the issue. Thanks!

@mahkoh
mahkoh merged commit 66510d2 into master Jul 19, 2026
13 checks passed
@mahkoh
mahkoh deleted the jorth/surface-ext-versioning branch July 19, 2026 22:47
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.

Incorrect popup_done() for client destroyed popups

3 participants