[mutter/wayland] wayland: Move cursor tracker handling code to meta_wayland_seat_handle_event
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] wayland: Move cursor tracker handling code to meta_wayland_seat_handle_event
- Date: Wed, 13 Nov 2013 14:01:38 +0000 (UTC)
commit 6cc014a941b0d14ae6916baab731841cf208c5b9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Oct 4 02:33:10 2013 -0400
wayland: Move cursor tracker handling code to meta_wayland_seat_handle_event
src/wayland/meta-wayland-seat.c | 13 +++++++++++++
src/wayland/meta-wayland.c | 19 +------------------
2 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c
index 259de37..ef404fa 100644
--- a/src/wayland/meta-wayland-seat.c
+++ b/src/wayland/meta-wayland-seat.c
@@ -369,6 +369,19 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
{
seat->pointer.button_count = count_buttons (event);
+ if (seat->cursor_tracker)
+ {
+ meta_cursor_tracker_update_position (seat->cursor_tracker,
+ wl_fixed_to_int (seat->pointer.x),
+ wl_fixed_to_int (seat->pointer.y));
+
+ if (seat->pointer.current == NULL)
+ meta_cursor_tracker_revert_root (seat->cursor_tracker);
+
+ meta_cursor_tracker_queue_redraw (seat->cursor_tracker,
+ CLUTTER_ACTOR (event->any.stage));
+ }
+
switch (event->type)
{
case CLUTTER_MOTION:
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 6351e48..eda618a 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -567,27 +567,10 @@ event_filter_cb (const ClutterEvent *event,
{
MetaWaylandCompositor *compositor = user_data;
MetaWaylandSeat *seat = compositor->seat;
- MetaWaylandPointer *pointer = &seat->pointer;
reset_idletimes (event);
- if (meta_wayland_seat_handle_event (compositor->seat, event))
- return TRUE;
-
- if (seat->cursor_tracker)
- {
- meta_cursor_tracker_update_position (seat->cursor_tracker,
- wl_fixed_to_int (pointer->x),
- wl_fixed_to_int (pointer->y));
-
- if (pointer->current == NULL)
- meta_cursor_tracker_revert_root (seat->cursor_tracker);
-
- meta_cursor_tracker_queue_redraw (seat->cursor_tracker,
- CLUTTER_ACTOR (event->any.stage));
- }
-
- return FALSE;
+ return meta_wayland_seat_handle_event (compositor->seat, event);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]