wlroots/types/output
Jesper Jensen 07e92fb868 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.
2025-08-07 22:25:39 +02:00
..
cursor.c output/cursor: Fix double cursor bug 2025-08-07 22:25:39 +02:00
output.c output: add output_pending_image_description() 2025-06-26 09:56:12 +00:00
render.c backend: replace get_buffer_caps hook with a struct field 2024-12-25 18:40:05 +00:00
state.c output: add color primaries to output state 2025-06-18 00:07:58 +02:00
swapchain.c swapchain, damage_ring: Drop buffer age 2024-08-21 09:45:54 -04:00