clutter/text: Switch to input device grabs

The old global/context grabs are being removed in favour of input device
grabs.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/536
This commit is contained in:
Jonas Dreßler 2019-04-04 20:29:00 +02:00
parent 75349f8cde
commit 32dcf77a8f

View File

@ -2260,7 +2260,10 @@ clutter_text_press (ClutterActor *actor,
priv->in_select_drag = TRUE;
if (type == CLUTTER_BUTTON_PRESS)
clutter_grab_pointer (actor);
{
clutter_input_device_grab (clutter_event_get_device (event),
actor);
}
else
{
clutter_input_device_sequence_grab (clutter_event_get_device (event),
@ -2318,7 +2321,7 @@ clutter_text_release (ClutterActor *actor,
{
if (!priv->in_select_touch)
{
clutter_ungrab_pointer ();
clutter_input_device_ungrab (clutter_event_get_device (event));
priv->in_select_drag = FALSE;
return CLUTTER_EVENT_STOP;