Repository navigation
fix(wayland): make layer-shell initial configure non-blocking - #2629
Merged
Merged
Conversation
Hona
force-pushed
the
fix/wayland-async-layer-configure
branch
from
November 27, 2026 14:58
6324720 to
e9bf0f9
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 #2454
Summary
wait_for_configurepoll(2)loop (up to 2 s per overlay) fromLayerSurface::new; it now sends the initial bufferless commit, flushes non-blockingly, and returns immediately without stalling the event loop.wl_outputremoval viawl_registry.global_removeinLayerSurfaceso a surface targeting an output that disappears before its firstconfigurecloses cleanly even without azwlr_layer_surface_v1.closedevent.overlay::layer_configure) andPendingLayersubsystem onOverlayCorethat holds an unconfiguredLayerSurfacewithout a GPU surface until its firstconfigurearrives through normalwake_on_wayland_readturns (wired intohas_live_wayland_layer,has_pending_platform_events,awaiting_layer_frame,draw,drain_hidden,hide,release,sync,resized,request_keys/release_keys,activation_token, and terminal GPU loss).configure(matchingWaylandResize,HideSync, andframe_callback) so compositors that deferconfigure(such as lock surfaces or DPMS-off outputs) are never killed while every failure end (closed, bound-output removal, fatal display error, hide/display-change/close) ends the wait as an event.timeout_msto its sole remaining caller inplatform::wayland::drop::machine::pipe_readand remove deadconfigure_wait.Verification
cargo check -p rune --libcargo check -p rune --lib --target wasm32-unknown-unknowncargo test -p rune --lib -- layer_configure layer_shell_machine pipe_read overlay::keys(52 passed)cargo test -p rune --lib -- layer_configure layer_shell_machine pipe_read overlay::(233 passed)platform/layer_shell/configure_tests.rs) provingLayerSurface::newreturns without waiting forconfigure, applies pre-configurepreferred_buffer_scale+ initialconfigure+ack_configure, and ends cleanly on earlyclosed, bound-wl_outputglobal_remove, and socket hangup (compiled and run by Linux CI).