[mutter] core/events: Fix cursor tracking for other backends



commit 9bdf4b35720fe7f0be74d758dcbb405877c54c51
Author: George Barrett <bob bob131 so>
Date:   Sun Jun 19 19:28:21 2022 +1000

    core/events: Fix cursor tracking for other backends
    
    The cursor rendering code path used by the screen cast code relies on
    the cursor tracker machinery to determine where to blit the cursor
    texture, but at the moment the cursor position invalidation is behind
    a check for whether the shell is using a Wayland backend. (This code
    path used to be Wayland-specific before 00cbcb7ba1 but has been
    backend-agnostic since).
    
    This commit removes the check for a Wayland compositor, allowing
    cursor drawing to function correctly on X11 when screen casting in
    embedded cursor mode.
    
    Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1780
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2474>

 src/core/events.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index cd81449194..eca21f52e5 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -328,8 +328,7 @@ meta_display_handle_event (MetaDisplay        *display,
       event->type != CLUTTER_DEVICE_REMOVED)
     handle_idletime_for_event (display, event);
 
-#ifdef HAVE_WAYLAND
-  if (wayland_compositor && event->type == CLUTTER_MOTION)
+  if (event->type == CLUTTER_MOTION)
     {
       MetaCursorRenderer *cursor_renderer;
       ClutterInputDevice *device;
@@ -348,7 +347,6 @@ meta_display_handle_event (MetaDisplay        *display,
           meta_cursor_tracker_invalidate_position (cursor_tracker);
         }
     }
-#endif
 
   window = get_window_for_event (display, event, event_actor);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]