From a9ba98686fff659634bd53327ad475cedcfccdae Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 19 Jun 2014 22:28:48 +0200 Subject: [PATCH] display: Add a global MetaGestureTracker --- src/core/display-private.h | 5 +++++ src/core/display.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/core/display-private.h b/src/core/display-private.h index 45e36eadd..03450d3a0 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h @@ -35,6 +35,7 @@ #include #include #include "keybindings-private.h" +#include "gesture-tracker-private.h" #include #include #include @@ -253,6 +254,8 @@ struct _MetaDisplay /* Managed by compositor.c */ MetaCompositor *compositor; + MetaGestureTracker *gesture_tracker; + int composite_event_base; int composite_error_base; int composite_major_version; @@ -442,4 +445,6 @@ void meta_display_sanity_check_timestamps (MetaDisplay *display, gboolean meta_display_timestamp_too_old (MetaDisplay *display, guint32 *timestamp); +MetaGestureTracker * meta_display_get_gesture_tracker (MetaDisplay *display); + #endif diff --git a/src/core/display.c b/src/core/display.c index feca954fb..07d05b446 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -808,6 +808,9 @@ meta_display_open (void) meta_screen_init_workspaces (screen); meta_screen_create_guard_window (screen); + /* Set up touch support */ + the_display->gesture_tracker = meta_gesture_tracker_new (0); + /* We know that if mutter is running as a Wayland compositor, * we start out with no windows. */ @@ -3152,3 +3155,9 @@ meta_display_create_x_cursor (MetaDisplay *display, { return meta_cursor_create_x_cursor (display->xdisplay, cursor); } + +MetaGestureTracker * +meta_display_get_gesture_tracker (MetaDisplay *display) +{ + return display->gesture_tracker; +}