fix(app): avoid Wayland pointer-constraint crash on focus regain #908
No reviewers
Labels
No labels
Context: Bug
Context: Enhancements
Platform: Android
Platform: Linux
Platform: Web
Platform: Windows
Platform: iOS
Platform: macOS
Release
Target: CI
Target: CLI
Target: Dependency
Target: Engine
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SakulFlee/Orbital!908
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/wayland-pointer-constraint-crash"
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?
Summary
Fixes the intermittent Wayland crash:
Wayland allows only one pointer constraint per surface and seat. In the winit version used by Orbital,
set_cursor_grabrecords the requested grab even when no pointer is over the surface. When the pointer enters later, winit re-applies it and can sendconfine_pointerwhile the previous constraint is still active. The compositor treats that as a fatalalready_constrainederror and drops the client connection.This is rust-windowing/winit#4073, fixed upstream in winit 0.30.10 (
6c214e7). TheOrbital-Winitfork, based oniced-rs/winitv0.30.x, carries the backport inSakulFlee/Orbital-Winit@6de2c63c.iced-rs/winitv0.30.xhas not moved since 2025-09-15 (still 0.30.8) and still lacks both this fix and the Android/iOS input work, so the fork remains required.Changes
Cargo.lock: bumpwinit/dpitoOrbital-Winita9d045d6.ModuleRuntime: track pointer-over-window and focus, and routeresumed,Focused,CursorGrabbed, andCursorEnteredthroughsync_cursor_grab(). Grabs are deferred until the pointer is over a focused surface, so winit is never asked to grab without a pointer.Verification
cargo fmt --all -- --checkcargo clippy -- -D warningscargo test --no-fail-fasttemplate_all_in_oneunder Wayland; clean exit, no protocol errors.WAYLAND_DEBUG=1:confine_pointeronly afterwl_pointer.enter; re-grabs aredestroy->confinewith no discarded destroy; noalready_constrained.Fork:
SakulFlee/Orbital-Winit@6de2c63c(fix),a9d045d6(docs).Smart test results
Result: PASS
Scope: full workspace
Reason: workspace-level change: Cargo.lock
Elapsed: 6m 56s
Workflow run
Overall: 388 tests, 378 passed, 0 failed, 10 skipped
Nextest: 377 tests, 377 passed, 0 failed, 0 skipped
Doctests: 11 tests, 1 passed, 0 failed, 10 skipped
Outcome charts are split between nextest and doctests. The timing chart covers nextest only.