wlroots/types/output
Jesper Jensen aa904ccf06 output/cursor: Fix double cursor bug
When we fail to render the cursor (in my case because the cursor is too
large) we bail out of the output_cursor_attempt_hardware function. This
causes output_cursor_set_texture to clean up after us, but we've already
cleared the hardware_cursor, and so output_disable_hardware_cursor
thinks we don't have a hardware cursor to disable.

We shouldn't modify the hardware_cursor variable before we've
successfully changed the hardware cursor, this way the caller can clean
up after us like it expect to.

This was brought up by an actual bug when playing the game Kaizen. Which
uses oddly sized cursors, that fell back to software cursors for me, and
left the hardware cursor hanging around. This change has been tested to
fix that.

During the testing of this change, I have noticed that the previous code
worked fine the first time the cursor was switch to software. It only
failed on subsequent attempts. I haven't figured out why that is.

(cherry picked from commit 07e92fb868)
2025-08-27 13:44:22 -04:00
..
cursor.c output/cursor: Fix double cursor bug 2025-08-27 13:44:22 -04:00
output.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
render.c backend: replace get_buffer_caps hook with a struct field 2024-12-25 18:40:05 +00:00
state.c Support direct scanout with src crop and dst boxes 2024-10-22 18:28:09 +01:00
swapchain.c swapchain, damage_ring: Drop buffer age 2024-08-21 09:45:54 -04:00