Skip to content

Commit d0185b8

Browse files
committed
nemo-dnd.c: Fix the drop action menu in Wayland.
This menu also popped up with no transient parent. Use our menu helper from 4a41953. Also disconnect its deactivate signal before unreffing it when done.
1 parent 4a41953 commit d0185b8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

libnemo-private/nemo-dnd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -924,19 +924,19 @@ nemo_drag_drop_action_ask (GtkWidget *widget,
924924
&damd);
925925

926926
gtk_grab_add (menu);
927-
928-
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
929-
NULL, NULL, 0, GDK_CURRENT_TIME);
930-
927+
928+
eel_pop_up_menu_at_pointer (GTK_MENU (menu), NULL, widget);
929+
931930
g_main_loop_run (damd.loop);
932931

933932
gtk_grab_remove (menu);
934-
935-
g_main_loop_unref (damd.loop);
933+
g_signal_handlers_disconnect_by_data (menu, &damd);
936934

937935
g_object_ref_sink (menu);
938936
g_object_unref (menu);
939937

938+
g_main_loop_unref (damd.loop);
939+
940940
return damd.chosen;
941941
}
942942

0 commit comments

Comments
 (0)