Skip to content

fix(compositor): a hidden cursor still hands effects its pointer and clicks - #1219

Merged
EtienneLescot merged 1 commit into
integration/shader-effectsfrom
fix/shader-effects-hidden-cursor
Oct 14, 2026
Merged

EtienneLescot merged 1 commit into
integration/shader-effectsfrom
fix/shader-effects-hidden-cursor

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Effects read ctx.cursor and ctx.clicks from plan_cursor, which returns None when the cursor is not drawn. With Show cursor off, during auto-hide, or under a zoom's hideCursor, a ripple on click never fired and an effect that follows the mouse lost it, in preview and export, on every backend.

Targets integration/shader-effects, rebased on it after #1206 merged: the effect inputs now carry the footage plane next to the pointer and clicks.

  • frame_geometry.rs. effect_pointer places the pointer and the last four clicks as plan_cursor places the cursor (through a CursorPlacer the two now share), whether or not the cursor is drawn.
    • A cursor the user hid still hands effects its pointer: an effect can follow the mouse, or draw its own cursor in place of the hidden one.
    • ctx.cursor.z is 0 only when the recording hid the pointer, or when a zoom leaves it out of frame. Earlier clicks stay.
    • CursorPlan drops pointer and clicks, which only effects read.
  • The three backends build one CursorPlanInput for the cursor and for the effects, and compute the effect pointer only when the scene has effects.
  • Docs: spec C.2 and native-compositor.md say what a hidden cursor hands an effect.

Related issue

Part of the shader effects work (#1199, #1202, #1206).

Type of change

  • Bug fix
  • Documentation

Release impact

  • No release note needed: shader effects are not reachable from the app yet

Desktop impact

  • Windows
  • macOS
  • Linux

Testing

  • Rust, on an M1: cargo test -p openscreen-compositor --lib --tests, 450 lib tests pass.
    • The geometry: the pointer and clicks with the cursor shown, hidden by the user (the same values, though nothing is drawn), and hidden by the recording (no pointer, the earlier clicks kept).
    • On the Metal device: under a hidden cursor, an effect that paints ctx.cursor.z red and ctx.clicks[0].w green comes out yellow. It came out black before the fix.
  • Windows and Linux: not compiled locally. This Mac cannot build either backend. Their edits mirror the macOS one and each gets the same GPU test; CI builds and runs them (ci: run CI on integration branches #1218).

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot EtienneLescot mentioned this pull request Oct 14, 2026
3 tasks done
@EtienneLescot
EtienneLescot force-pushed the feat/shader-effects-macos branch from 80c6dde to e16a014 Compare October 14, 2026 16:23
@EtienneLescot
EtienneLescot changed the base branch from feat/shader-effects-macos to integration/shader-effects October 14, 2026 17:46
…clicks

Effects read ctx.cursor and ctx.clicks from plan_cursor, which returns
None when the cursor is not drawn: with Show cursor off, or during
auto-hide, a ripple on click never fired and an effect following the
mouse lost it, in preview and export, on every backend.

- frame_geometry: effect_pointer places the pointer and the last clicks
  as plan_cursor places the cursor (a shared CursorPlacer), whether or
  not the cursor is drawn. ctx.cursor.z is 0 only when the recording hid
  the pointer or a zoom leaves it out of frame; earlier clicks stay.
  CursorPlan drops the two fields only effects read.
- The three backends build one CursorPlanInput for the cursor and the
  effects, and compute the effect pointer only for a scene with effects.
- Tests: the geometry with the cursor shown, hidden by the user and
  hidden by the recording; on the Metal device (and its D3D11 and wgpu
  mirrors), an effect that paints ctx.cursor.z and ctx.clicks[0].w sees both
  under a hidden cursor, and saw neither before the fix.
- Spec C.2 and native-compositor.md say what a hidden cursor hands an
  effect.
@EtienneLescot
EtienneLescot marked this pull request as ready for review October 14, 2026 17:49
@EtienneLescot
EtienneLescot force-pushed the fix/shader-effects-hidden-cursor branch from 9bc1564 to d284cbc Compare October 14, 2026 17:49
@EtienneLescot
EtienneLescot merged commit 6921e1c into integration/shader-effects Oct 14, 2026
17 checks passed
@EtienneLescot
EtienneLescot deleted the fix/shader-effects-hidden-cursor branch October 14, 2026 17:53
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