mirror of
https://github.com/brl/mutter.git
synced 2025-07-05 10:31:18 +00:00
display: Add meta_display_is_pointer_emulating_sequence()
This function tells the obvious on X11, and implements a similar mechanism on wayland to determine the "pointer emulating" sequence, or one to stick with when implementing single-touch behavior. https://bugzilla.gnome.org/show_bug.cgi?id=733631
This commit is contained in:
@ -3239,3 +3239,23 @@ meta_display_request_restart (MetaDisplay *display)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_display_is_pointer_emulating_sequence:
|
||||
* @display: the display
|
||||
* @sequence: (nullable): a #ClutterEventSequence
|
||||
*
|
||||
* Tells whether the event sequence is the used for pointer emulation
|
||||
* and single-touch interaction.
|
||||
*
|
||||
* Returns: #TRUE if the sequence emulates pointer behavior
|
||||
**/
|
||||
gboolean
|
||||
meta_display_is_pointer_emulating_sequence (MetaDisplay *display,
|
||||
ClutterEventSequence *sequence)
|
||||
{
|
||||
if (!sequence)
|
||||
return FALSE;
|
||||
|
||||
return display->pointer_emulating_sequence == sequence;
|
||||
}
|
||||
|
Reference in New Issue
Block a user