forked from AuroraMiddleware/gtk
widget: reset all controllers when the widget becomes insensitive
Widgets becoming insensitive won't receive further events, but there could be chances the controllers don't get properly notified and reset in those situations.
This commit is contained in:
parent
14d1a5cba4
commit
90424289fb
@ -12681,6 +12681,19 @@ gtk_widget_propagate_state (GtkWidget *widget,
|
||||
g_list_free (devices);
|
||||
}
|
||||
|
||||
if (!gtk_widget_is_sensitive (widget))
|
||||
{
|
||||
EventControllerData *data;
|
||||
GList *l;
|
||||
|
||||
/* Reset all controllers */
|
||||
for (l = priv->event_controllers; l; l = l->next)
|
||||
{
|
||||
data = l->data;
|
||||
gtk_event_controller_reset (data->controller);
|
||||
}
|
||||
}
|
||||
|
||||
if (GTK_IS_CONTAINER (widget))
|
||||
{
|
||||
GtkStateData child_data;
|
||||
|
Loading…
Reference in New Issue
Block a user