Commit a9ba9868 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Jasper St. Pierre
Browse files

display: Add a global MetaGestureTracker

parent 59382bac
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <meta/boxes.h> #include <meta/boxes.h>
#include <meta/display.h> #include <meta/display.h>
#include "keybindings-private.h" #include "keybindings-private.h"
#include "gesture-tracker-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/barrier.h> #include <meta/barrier.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
...@@ -253,6 +254,8 @@ struct _MetaDisplay ...@@ -253,6 +254,8 @@ struct _MetaDisplay
/* Managed by compositor.c */ /* Managed by compositor.c */
MetaCompositor *compositor; MetaCompositor *compositor;
MetaGestureTracker *gesture_tracker;
int composite_event_base; int composite_event_base;
int composite_error_base; int composite_error_base;
int composite_major_version; int composite_major_version;
...@@ -442,4 +445,6 @@ void meta_display_sanity_check_timestamps (MetaDisplay *display, ...@@ -442,4 +445,6 @@ void meta_display_sanity_check_timestamps (MetaDisplay *display,
gboolean meta_display_timestamp_too_old (MetaDisplay *display, gboolean meta_display_timestamp_too_old (MetaDisplay *display,
guint32 *timestamp); guint32 *timestamp);
MetaGestureTracker * meta_display_get_gesture_tracker (MetaDisplay *display);
#endif #endif
...@@ -808,6 +808,9 @@ meta_display_open (void) ...@@ -808,6 +808,9 @@ meta_display_open (void)
meta_screen_init_workspaces (screen); meta_screen_init_workspaces (screen);
meta_screen_create_guard_window (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 know that if mutter is running as a Wayland compositor,
* we start out with no windows. * we start out with no windows.
*/ */
...@@ -3152,3 +3155,9 @@ meta_display_create_x_cursor (MetaDisplay *display, ...@@ -3152,3 +3155,9 @@ meta_display_create_x_cursor (MetaDisplay *display,
{ {
return meta_cursor_create_x_cursor (display->xdisplay, cursor); return meta_cursor_create_x_cursor (display->xdisplay, cursor);
} }
MetaGestureTracker *
meta_display_get_gesture_tracker (MetaDisplay *display)
{
return display->gesture_tracker;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment