Skip to content

refactor(wayland): extract render runtime and centralize input routing - #380

Merged
devmobasa merged 3 commits into
refactor/wayland-runtime-ownersfrom
refactor/wayland-render-routing
Sep 4, 2026
Merged

refactor(wayland): extract render runtime and centralize input routing#380
devmobasa merged 3 commits into
refactor/wayland-runtime-ownersfrom
refactor/wayland-render-routing

Conversation

@devmobasa

@devmobasa devmobasa commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extract frame-to-frame rendering state into RenderRuntime.
  • Replace positional UI-damage booleans with typed UiEffect slots.
  • Delete StateData after moving its remaining fields to behavior-owning runtimes.
  • Add SurfaceRouter as the single pointer, touch, and stylus surface classifier.
  • Split long pointer-motion, touch, and cursor handlers into focused helpers.

Details

RenderRuntime now owns:

  • canvas-layer caching
  • render-profile UI baselines
  • previous UI-effect footprints used for damage tracking

Input callbacks now route protocol surface IDs through RoutedInput, which records:

  • canvas, toolbar, or foreign surface ownership
  • whether inline toolbar routing is active
  • overlay screen coordinates when available

Toolbar-local coordinates are converted to overlay coordinates in one place. Foreign surfaces never receive overlay coordinates. Touch sequences retain their initial TouchTarget independently from the surface classification of later callbacks.

The refactor preserves callback ordering, toolbar drag handoff, cursor precedence, release suppression, modal ownership, and render-damage behavior.

Validation

  • cargo check --workspace --all-features
  • cargo check --workspace --no-default-features
  • cargo test --workspace --all-features
  • cargo test --workspace --no-default-features
  • Focused Wayland handler tests under both feature sets
  • cargo fmt --all
  • git diff --check

Strict Clippy reaches only the known Rust 1.98 baseline diagnostics: 27 with all features and 23 without default features.

@devmobasa
devmobasa merged commit 226dfcc into refactor/wayland-runtime-owners Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant