forked from AuroraMiddleware/gtk
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))
|
||||
{
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user