gdkdrop-x11: Fix preferred action
authorCorey Berla <corey@berla.me>
Sat, 16 Jul 2022 20:01:31 +0000 (13:01 -0700)
committerCorey Berla <corey@berla.me>
Sat, 16 Jul 2022 20:42:58 +0000 (13:42 -0700)
gdk_x11_drop_update_actions() sets actions to
drop_x11->suggested_action when !drop_x11->xdnd_have_actions
and then sets it again to drop_x11->suggested_action if it is.
If xdnd_have_actions is true use xdnd_actions.

gdk/x11/gdkdrop-x11.c

index 91987fad13989f3b7087b1af3e3903c74eb2a229..3f7566d88df0f6a3de5a6070f49b53a3b51931ae 100644 (file)
@@ -361,9 +361,9 @@ gdk_x11_drop_update_actions (GdkX11Drop *drop_x11)
   if (!drop_x11->xdnd_have_actions)
     actions = drop_x11->suggested_action;
   else if (drop_x11->suggested_action & GDK_ACTION_ASK)
-    actions = drop_x11->xdnd_actions & GDK_ACTION_ALL;
+    actions = drop_x11->xdnd_actions | GDK_ACTION_ASK;
   else
-    actions = drop_x11->suggested_action;
+    actions = drop_x11->xdnd_actions & GDK_ACTION_ALL;
 
   gdk_drop_set_actions (GDK_DROP (drop_x11), actions);
 }