mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
cursor-tracker: Add API to get whether the pointer is visible
Allow checking whether the pointer is visible without accessing the trackers internal is_showing property. While we don't need this just yet for reading the visibility inside meta-wayland-pointer, it's useful when implementing the logic to remove Clutter's focus when the cursor goes hidden later. https://gitlab.gnome.org/GNOME/mutter/merge_requests/448
This commit is contained in:
parent
a95644dbdc
commit
faa7b2d4e5
@ -418,6 +418,12 @@ meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker,
|
||||
get_pointer_position_gdk (x, y, (int*)mods);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_cursor_tracker_get_pointer_visible (MetaCursorTracker *tracker)
|
||||
{
|
||||
return tracker->is_showing;
|
||||
}
|
||||
|
||||
void
|
||||
meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
|
||||
gboolean visible)
|
||||
|
@ -55,6 +55,9 @@ void meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker,
|
||||
int *y,
|
||||
ClutterModifierType *mods);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_cursor_tracker_get_pointer_visible (MetaCursorTracker *tracker);
|
||||
|
||||
META_EXPORT
|
||||
void meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
|
||||
gboolean visible);
|
||||
|
Loading…
Reference in New Issue
Block a user