From c17d85e16b09e4242b4c3132078c893d19746533 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 9 Jan 2015 17:29:06 +0100 Subject: [PATCH] wayland: Let MetaWaylandTabletManager process tablet events meta_wayland_tablet_manager_update()/handle_event() are called before the MetaWaylandSeat counterparts. If the event comes from a device managed by MetaWaylandTabletManager, the event will be exclusively handled by it. --- src/wayland/meta-wayland.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index c8f79a419..4a8e67706 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -168,7 +168,10 @@ void meta_wayland_compositor_update (MetaWaylandCompositor *compositor, const ClutterEvent *event) { - meta_wayland_seat_update (compositor->seat, event); + if (meta_wayland_tablet_manager_consumes_event (compositor->tablet_manager, event)) + meta_wayland_tablet_manager_update (compositor->tablet_manager, event); + else + meta_wayland_seat_update (compositor->seat, event); } void @@ -197,6 +200,10 @@ gboolean meta_wayland_compositor_handle_event (MetaWaylandCompositor *compositor, const ClutterEvent *event) { + if (meta_wayland_tablet_manager_handle_event (compositor->tablet_manager, + event)) + return TRUE; + return meta_wayland_seat_handle_event (compositor->seat, event); }