Skip to content

Various cursor image-copy fixes - #2571

Merged
Drakulix merged 9 commits into
masterfrom
cursor_noble
Jul 21, 2026
Merged

Drakulix merged 9 commits into
masterfrom
cursor_noble

Conversation

@ids1024

@ids1024 ids1024 commented Jul 15, 2026

Copy link
Copy Markdown
Member

There are more edge cases around image-copy to address, as well as inconsistency between handling of PointerMotion/PointerMotionAbsolute, along with more code deduplication, workspace capture, and #2248. But the changes here should be a good incremental improvement.

The changes related to metadata cursor capture won't have an effect without pop-os/xdg-desktop-portal-cosmic#175.

This also has a change to hold a references to Buffer, that should prevent some potential synchronization issues (though in most cases it should have no effect). And it also changes the pointer warp behavior to send wl_pointer::motion, which seems to match Gnome.

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@ids1024
ids1024 requested review from a team July 15, 2026 00:02

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good. Lots of neat little changes, I like it :)

Comment thread src/backend/kms/surface/mod.rs Resolved
Comment thread src/input/mod.rs Resolved
@ids1024
ids1024 requested a review from a team July 16, 2026 16:01

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

ids1024 added 9 commits July 20, 2026 14:48
The `wl_buffer` now won't be released until sync fence polls ready.
This ensures we avoid advertising a `0,0` buffer size (which will
protocol error to actually allocate), and avoids defining the supported
formats for cursor capture buffers in a bunch of places.
Inference behavior can be confusing, and the coordinate here is global,
so use `Global` like the `PointerMotion*` event handlers.
Gnome seems to send `motion` in these cases. The spec isn't 100%
explicit, but it seems `motion` events are needed for the client to have
the same understanding of where the pointer is as the compositor, which
generally seems to be desired.

This is also needed for toplevel cursor image-copy to get the position
change. Likewise, we want image-copy to have the same understanding of
where the cursor is as the compositor and client.
@ids1024

ids1024 commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Rebased on latest master.

@Drakulix
Drakulix merged commit d7d6be3 into master Jul 21, 2026
5 of 6 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.

3 participants