mirror of
https://github.com/games-on-whales/gst-wayland-display.git
synced 2026-10-15 21:02:00 +00:00
[PR #28] [CLOSED] fix: propagate runtime resolution changes to connected clients #30
Labels
No labels
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gst-wayland-display#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/28
Author: @JBailes
Created: 4/24/2026
Status: ❌ Closed
Base:
stable← Head:fix/resolution-switching📝 Commits (1)
f732af5fix: propagate runtime resolution changes to connected clients📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
wayland-display-core/src/comp/mod.rs(+6 -6)📄 Description
Summary
Closes the long-standing TODO in
wayland-display-core/src/comp/mod.rsthat silently drops a secondCommand::VideoInfoonce the compositor output exists. Before this change, callingset_resolution()after the first frame would update the gstreamer caps/buffer size, but connected Wayland clients kept observing the originalwl_output.modeand mappedxdg_toplevels kept the original size — the compositor never re-broadcast the new state.The fix
returnfrom theCommand::VideoInfohandler.output_already_runningsospace.map_output(&output, (0, 0))still only runs once (re-mapping would duplicate the output in the space).output.change_current_state(Some(mode), …)already broadcastswl_output.geometry/wl_output.modeto bound clients.OutputDamageTracker::from_outputis rebuilt for the new size.GsGlesbuffer/GsDmaBuf/GsCUDABuf) — necessary for DMA-BUF resolution switching, which is what the original TODO called out.with_pending_state/send_configure), so clients see a freshxdg_toplevel.configurewith the new dimensions.Net diff: 6 lines changed in one file.
Reproduction / validation
Validated against a new
[WAYLAND][resolution]Catch2 integration test harness added in games-on-whales/wolf#399, which drives a real Wayland client against the virtual display and asserts, among other things:wl_outputadvertises the configured mode to the client on bind.xdg_toplevelreceives an initial configure matching the output size.set_resolution()call propagates newwl_output.modeandxdg_toplevel.configureevents to the connected client.wl_output.mode.refresh.Tests 3–6 reproduce the bug on
stableand are green with this fix applied.Test plan
cargo check -p wayland-display-core— clean (verified).cargo fmt --check— clean (verified).[WAYLAND][resolution]) turn green once this lands.Relation to PR #27
An earlier draft PR (#27
codex/output-resize-updates) proposes a similar approach, plus additionalFullscreen/Activatedstate bits on the toplevel pending-state. This PR intentionally keeps the diff minimal — only what's needed to close the resolution-switching gap. Happy to fold in the extra state bits here or supersede either direction based on maintainer preference.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.