Repository navigation
Conversation
Window::set_parent support through the cross-platform parent attribute is not implemented on Wayland, and setting xdg_toplevel.set_parent after the window has been created is too late: the first commit has already requested the initial configure, so a tiling compositor sizes the window as a tiled toplevel even if it later floats it once the parent arrives. Add WindowAttributesExtWayland::with_transient_parent(Arc<Window>). The parent is validated (it must be a Wayland window on the same connection) and applied with xdg_toplevel.set_parent right after the SCTK window is created and before its first commit, so the compositor can choose the size and placement of an auxiliary window from the start. The attribute keeps the parent alive until creation; the application owns both windows afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Canopa fork tracking PR. Its diff against
canopa/base(upstream v0.30.13,e9809ef) is exactly the change Canopa carries. It is merged intocanopa/main, which Canopa builds. This PR stays open until the change is upstreamed or dropped.What
WindowAttributesExtWayland::with_transient_parent(Arc<Window>):OsError);xdg_toplevel.set_parentright after the SCTK window is created, before its first commit and initial configure;Why
Canopa Files opens a floating Quick Look attached to its Browser window. Setting the parent after creation is too late: on Niri the child floated but kept the initial tiled 1280 × 800 size instead of the requested 760 × 600, because the first configure had already been computed for a tiled toplevel. See Canopa ADR 0019. Iced's
window::open_transient(kevinard/iced) builds on this.Verification
cargo check --all-targetspasses at this branch with the Wayland features Canopa uses (--no-default-features --features rwh_06,wayland,wayland-dlopen,wayland-csd-adwaita) and with the default features (X11 + Wayland).Upstream
Related: issue rust-windowing#4256 and PR rust-windowing#4627 (open) on transient parents. Still applies to upstream master. The hunks are not rustfmt-formatted yet; clean them before submission.
🤖 Generated with Claude Code