Commit 2b703b61 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

gtk: Add private gtk_widget_reset_controllers()

This is a one-shot call that can be called on the places we
know we're taking input away.
parent e4f5e31b
......@@ -12834,17 +12834,7 @@ gtk_widget_propagate_state (GtkWidget *widget,
}
if (!gtk_widget_is_sensitive (widget))
{
EventControllerData *controller_data;
GList *l;
/* Reset all controllers */
for (l = priv->event_controllers; l; l = l->next)
{
controller_data = l->data;
gtk_event_controller_reset (controller_data->controller);
}
}
gtk_widget_reset_controllers (widget);
if (GTK_IS_CONTAINER (widget))
{
......@@ -17424,3 +17414,18 @@ _gtk_widget_consumes_motion (GtkWidget *widget,
return FALSE;
}
void
gtk_widget_reset_controllers (GtkWidget *widget)
{
EventControllerData *controller_data;
GtkWidgetPrivate *priv = widget->priv;
GList *l;
/* Reset all controllers */
for (l = priv->event_controllers; l; l = l->next)
{
controller_data = l->data;
gtk_event_controller_reset (controller_data->controller);
}
}
......@@ -292,6 +292,8 @@ void gtk_widget_set_csd_input_shape (GtkWidget
gboolean gtk_widget_has_size_request (GtkWidget *widget);
void gtk_widget_reset_controllers (GtkWidget *widget);
/* inline getters */
static inline gboolean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment