diff --git a/src/core/meta-cursor-tracker.c b/src/core/meta-cursor-tracker.c index bfe35d5a5..704295116 100644 --- a/src/core/meta-cursor-tracker.c +++ b/src/core/meta-cursor-tracker.c @@ -294,3 +294,15 @@ meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker, gdk_screen_get_root_window (gscreen), NULL, (GdkModifierType*)mods); } + +void +meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker, + gboolean visible) +{ + if (visible) + XFixesShowCursor (tracker->screen->display->xdisplay, + tracker->screen->xroot); + else + XFixesHideCursor (tracker->screen->display->xdisplay, + tracker->screen->xroot); +} diff --git a/src/meta/meta-cursor-tracker.h b/src/meta/meta-cursor-tracker.h index 8862e4345..39202951a 100644 --- a/src/meta/meta-cursor-tracker.h +++ b/src/meta/meta-cursor-tracker.h @@ -52,5 +52,7 @@ void meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker, int *x, int *y, ClutterModifierType *mods); +void meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker, + gboolean visible); #endif