From 9bdf4b35720fe7f0be74d758dcbb405877c54c51 Mon Sep 17 00:00:00 2001 From: George Barrett Date: Sun, 19 Jun 2022 19:28:21 +1000 Subject: [PATCH] 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: --- 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 cd8144919..eca21f52e 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);