events: Update the pointer position here
Rather than in the Wayland front-end, since it's really a core operation.
This commit is contained in:
parent
dc0437a5b5
commit
9feb9d6bca
@ -35,6 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
|
#include "backends/meta-cursor-tracker-private.h"
|
||||||
#include "wayland/meta-wayland-private.h"
|
#include "wayland/meta-wayland-private.h"
|
||||||
#endif
|
#endif
|
||||||
#include "meta-surface-actor.h"
|
#include "meta-surface-actor.h"
|
||||||
@ -187,6 +188,14 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WAYLAND
|
||||||
|
if (meta_is_wayland_compositor () && event->type == CLUTTER_MOTION)
|
||||||
|
{
|
||||||
|
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL);
|
||||||
|
meta_cursor_tracker_update_position (tracker, event->motion.x, event->motion.y);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
handle_idletime_for_event (event);
|
handle_idletime_for_event (event);
|
||||||
|
|
||||||
window = get_window_for_event (display, event);
|
window = get_window_for_event (display, event);
|
||||||
|
@ -315,14 +315,6 @@ meta_wayland_pointer_update (MetaWaylandPointer *pointer,
|
|||||||
repick_for_event (pointer, event);
|
repick_for_event (pointer, event);
|
||||||
|
|
||||||
pointer->button_count = count_buttons (event);
|
pointer->button_count = count_buttons (event);
|
||||||
|
|
||||||
if (pointer->cursor_tracker)
|
|
||||||
{
|
|
||||||
ClutterPoint pos;
|
|
||||||
|
|
||||||
clutter_input_device_get_coords (pointer->device, NULL, &pos);
|
|
||||||
meta_cursor_tracker_update_position (pointer->cursor_tracker, pos.x, pos.y);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user