Fix change notification for event controllers

We were adding event controllers at the end, but
announcing a change at the beginning, in
gtk_widget_add_controller. Fix that by emitting
::items-changed for the position where we actually
inserted the controller.
This commit is contained in:
Matthias Clasen 2020-06-22 12:46:12 -04:00
parent 418bbb2685
commit 9faaa5e8be

View File

@ -11412,7 +11412,7 @@ gtk_widget_add_controller (GtkWidget *widget,
g_ptr_array_add (priv->controllers, controller);
if (priv->controller_observer)
gtk_list_list_model_item_added_at (priv->controller_observer, 0);
gtk_list_list_model_item_added_at (priv->controller_observer, priv->controllers->len - 1);
}
/**