wl_surface: don't propagate commit to ext if ext has changed since commit#1117
Merged
Conversation
There was a problem hiding this comment.
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_versiontracking onWlSurfaceand propagate it throughPendingStateand queuedCommitentries. - Gate
before_apply_commit,after_apply_commit, and timeline-drivenunmapso they only run whenpending.ext_versionmatches the current surfaceext_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.
Contributor
|
It does indeed fixes the issue. Thanks! |
mahkoh
force-pushed
the
jorth/surface-ext-versioning
branch
from
July 19, 2026 22:42
3c66c31 to
1395c8e
Compare
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.
Closes #1103