[mutter] events: Update the pointer position here
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] events: Update the pointer position here
- Date: Thu, 21 Aug 2014 21:22:52 +0000 (UTC)
commit 9feb9d6bcad9d0a5d88399176da118f4c2c85296
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Aug 21 16:57:27 2014 -0400
events: Update the pointer position here
Rather than in the Wayland front-end, since it's really a core operation.
src/core/events.c | 9 +++++++++
src/wayland/meta-wayland-pointer.c | 8 --------
2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 0fb30bc..6b02898 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -35,6 +35,7 @@
#endif
#ifdef HAVE_WAYLAND
+#include "backends/meta-cursor-tracker-private.h"
#include "wayland/meta-wayland-private.h"
#endif
#include "meta-surface-actor.h"
@@ -187,6 +188,14 @@ meta_display_handle_event (MetaDisplay *display,
}
#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);
window = get_window_for_event (display, event);
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index a6ac086..c264a43 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -315,14 +315,6 @@ meta_wayland_pointer_update (MetaWaylandPointer *pointer,
repick_for_event (pointer, 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]