Reset event controllers on GdkEventGrabBroken
This event means that the widget being listened won't receive further input events as something else grabbed devices, reset event controllers in this case. This helps with SL #4128 where we did reset the long press controller manually. Signed-off-by: Carlos Garnacho <carlos@lanedo.com> Acked-by: Simon Schampijer <simon@laptop.org>
This commit is contained in:
parent
dcfc92dbd0
commit
b2df135844
@ -203,6 +203,10 @@ _sugar_event_controller_widget_event (GtkWidget *widget,
|
||||
data->current_exclusive != item->controller)
|
||||
continue;
|
||||
|
||||
if (event->type == GDK_GRAB_BROKEN && !event->grab_broken.keyboard)
|
||||
sugar_event_controller_reset (item->controller);
|
||||
else
|
||||
{
|
||||
if (!sugar_event_controller_handle_event (item->controller, event))
|
||||
continue;
|
||||
|
||||
@ -214,6 +218,7 @@ _sugar_event_controller_widget_event (GtkWidget *widget,
|
||||
if (state == SUGAR_EVENT_CONTROLLER_STATE_RECOGNIZED)
|
||||
handled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user