mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 10:50:08 +00:00
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.
This commit is contained in:
parent
e4f5e31b8b
commit
2b703b61cf
@ -12834,17 +12834,7 @@ gtk_widget_propagate_state (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_is_sensitive (widget))
|
if (!gtk_widget_is_sensitive (widget))
|
||||||
{
|
gtk_widget_reset_controllers (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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GTK_IS_CONTAINER (widget))
|
if (GTK_IS_CONTAINER (widget))
|
||||||
{
|
{
|
||||||
@ -17424,3 +17414,18 @@ _gtk_widget_consumes_motion (GtkWidget *widget,
|
|||||||
|
|
||||||
return FALSE;
|
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);
|
gboolean gtk_widget_has_size_request (GtkWidget *widget);
|
||||||
|
|
||||||
|
void gtk_widget_reset_controllers (GtkWidget *widget);
|
||||||
|
|
||||||
/* inline getters */
|
/* inline getters */
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user