Repository navigation
fix(wayland): distinguish unplugged output from layer surface close and skip gone displays - #2632
Merged
Merged
Conversation
…nd skip gone displays
Hona
force-pushed
the
fix/wayland-unplugged-output-overlay
branch
from
November 27, 2026 15:14
460bba2 to
52ad42e
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.
Fixes #2453.
Summary
readiness::Statenow moves toClosingand emitsEffect::SendCloseSyncwhenzwlr_layer_surface_v1.closedarrives, sending awl_display.syncroundtrip on the layer surface's queue.LayerSurfacetracks its output global name vialayer_shell_machine::output::SurfaceOutput(pinned when created with an explicitoutput_id, or followingwl_surface.enter/wl_surface.leaveviaSharedGlobals::bind_all_outputs+OutputGlobaluser data when created without an output—remembering the output it is on now or left last).wl_outputglobal disappears (wl_registry.global_remove) before the sync'swl_callback.done—or withoutclosedever arriving—readinessends withCloseKind::OutputGone; otherwisewl_callback.doneends it withCloseKind::Closed.OverlayCore::layer_output_gonehides and drops the layer surface without marking the overlayUnavailable, recordingOverlayHandle::failure, or firingon_availability. Plain compositor closes and display connection errors continue to fail as before.show()aimed at a gone display from landing on another output:resolve_wayland_outputreturnsWaylandOutputTarget::GonewhenDisplayTarget::IdorDisplayTarget::Native(NativeDisplayId::Wayland(_))is no longer connected, andLayerSurface::newreturnsErr(NewError::OutputGone)if the requestedwl_outputis absent fromSharedGlobalsor removed during initial configure wait.OverlayCore::preparestops onLayerOutcome::OutputGonewithout falling back to an unbound output, XWayland, or toplevel, and reports no failure.Verification
cargo check -p rune,cargo test -p rune --lib layer_shell_machine— 49 passed,cargo test -p rune --lib overlay::— 191 passed).crates/rune/src/platform/layer_shell/output_tests.rscovering post-close sync,global_removebefore/afterclosed,global_removewithoutclosed,wl_surface.enter/leaveoutput tracking, gone-outputLayerSurface::new, and drop cleanup while closing.