Skip to content

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Jun 6, 2025

It would be nice if some of this code iterating over all surfaces could be shared (it's partly similar to render_input_order; but not exactly). But that isn't changed here.

(It would probably also be nice to avoid having to iterate through everything so often in so many places, if possible. No specific suggestions for that though.)

Perhaps visible_output_for_surface should also return multiple outputs, when a surfaces overlaps multiple. To queue redraws on every output that's overlapped.

ids1024 added 5 commits June 6, 2025 14:20
`org.gnome.gitlab.YaLTeR.Identity` is a good way to test animated dnd
surfaces.
It can still get unthrottled frame callbacks by not having any primary
scanout output, but presumably we want this. Alongside the code setting
it for cursor surfaces, and dragged windows.
The `cursor_image_status()` function saves some duplication in various
places. The `set_cursor_image_status()` saves a bit less, but is also
handy.
This is added on creation of the seat, and unwrapped, when setting the
status, so the `unwrap_or` case here seems unnecessary.
This ensures that a commit to a cursor or drag surface will queue a
redraw, even if nothing else has changed on screen.

This can be tested by running `vkgears` in an otherwise empty
cosmic-comp instance, and dragging it.
@ids1024 ids1024 requested a review from Drakulix June 6, 2025 23:02
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Seems like a nice continuation from #1080, but presumably we also want to send dmabuf-feedback?

@ids1024
Copy link
Member Author

ids1024 commented Jun 10, 2025

Oh yeah, I forgot there was an earlier PR for this.

Presumably sending dmabuf-feedback should be done too. This seems to work with the clients tested (I haven't tried anything using animated dmabuf cursors), but I guess it would just be using default feedback. Or the previous feedback for windows being dragged.

Definitely would be nice to somehow reduce the number of places we have code iterating over every type of surface...

@ids1024
Copy link
Member Author

ids1024 commented Jun 10, 2025

Added a commit updating send_dmabuf_feedback().

@Drakulix Drakulix merged commit 5eeff37 into master Jun 10, 2025
6 checks passed
@ids1024 ids1024 deleted the frames_noble branch June 16, 2025 18:52
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.

2 participants