From f68e2e6fd4de8a9273ce23924033f8a853d35208 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 7 Feb 2024 21:25:45 +0100 Subject: [PATCH] render: render dnd icons for hardware cursors --- src/gfx_apis/gl/renderer/framebuffer.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gfx_apis/gl/renderer/framebuffer.rs b/src/gfx_apis/gl/renderer/framebuffer.rs index 8ffb32a0..1d73d475 100644 --- a/src/gfx_apis/gl/renderer/framebuffer.rs +++ b/src/gfx_apis/gl/renderer/framebuffer.rs @@ -190,9 +190,6 @@ impl Framebuffer { if let Some(rect) = cursor_rect { let seats = state.globals.lock_seats(); for seat in seats.values() { - if !render_hardware_cursor && seat.hardware_cursor() { - continue; - } if let Some(cursor) = seat.get_cursor() { let (mut x, mut y) = seat.get_position(); if let Some(dnd_icon) = seat.dnd_icon() { @@ -205,10 +202,12 @@ impl Framebuffer { renderer.render_surface(&dnd_icon, x, y, i32::MAX, i32::MAX); } } - cursor.tick(); - x -= Fixed::from_int(rect.x1()); - y -= Fixed::from_int(rect.y1()); - cursor.render(&mut renderer, x, y); + if render_hardware_cursor || !seat.hardware_cursor() { + cursor.tick(); + x -= Fixed::from_int(rect.x1()); + y -= Fixed::from_int(rect.y1()); + cursor.render(&mut renderer, x, y); + } } } }