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:
Timm Bäder 2020-11-29 09:42:18 +01:00 committed by Matthias Clasen
parent ff8de0a93f
commit af28237569

View File

@ -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);