mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
popovermenu: Connect to right controller signal
leave is emitted before the new contains-pointer value is set, so the signal handler wasn't working right.
This commit is contained in:
parent
ff8de0a93f
commit
af28237569
@ -309,7 +309,7 @@ gtk_popover_menu_init (GtkPopoverMenu *popover)
|
|||||||
gtk_widget_add_controller (GTK_WIDGET (popover), controller);
|
gtk_widget_add_controller (GTK_WIDGET (popover), controller);
|
||||||
|
|
||||||
controller = gtk_event_controller_motion_new ();
|
controller = gtk_event_controller_motion_new ();
|
||||||
g_signal_connect (controller, "leave", G_CALLBACK (leave_cb), popover);
|
g_signal_connect (controller, "notify::contains-pointer", G_CALLBACK (leave_cb), popover);
|
||||||
gtk_widget_add_controller (GTK_WIDGET (popover), controller);
|
gtk_widget_add_controller (GTK_WIDGET (popover), controller);
|
||||||
|
|
||||||
controllers = gtk_widget_list_controllers (GTK_WIDGET (popover), GTK_PHASE_CAPTURE, &n_controllers);
|
controllers = gtk_widget_list_controllers (GTK_WIDGET (popover), GTK_PHASE_CAPTURE, &n_controllers);
|
||||||
|
Loading…
Reference in New Issue
Block a user