mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
MetaCursorTracker: add methods for setting the cursor visibility
clutter_stage_show_cursor()/hide_cursor() only works in the X11 backend (where someone else is in charge of showing the cursor), and even then, it has confusing effects when running nested wayland, so an abstraction layer is needed. https://bugzilla.gnome.org/show_bug.cgi?id=707474
This commit is contained in:
parent
3053cc0de4
commit
6327b8d15a
@ -294,3 +294,15 @@ meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker,
|
|||||||
gdk_screen_get_root_window (gscreen),
|
gdk_screen_get_root_window (gscreen),
|
||||||
NULL, (GdkModifierType*)mods);
|
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);
|
||||||
|
}
|
||||||
|
@ -52,5 +52,7 @@ void meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker,
|
|||||||
int *x,
|
int *x,
|
||||||
int *y,
|
int *y,
|
||||||
ClutterModifierType *mods);
|
ClutterModifierType *mods);
|
||||||
|
void meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
|
||||||
|
gboolean visible);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user