From 5cdbbc6e613d23478812b299d75eedccdc54be84 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 4 Jul 2018 12:00:47 +0200 Subject: [PATCH] win32: Build fixes --- gdk/win32/gdkdrag-win32.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index 09d93a6197..7a9591c967 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -806,7 +806,7 @@ gdk_drag_new (GdkDisplay *display, else drag_win32->scale = _gdk_win32_display_get_monitor_scale_factor (win32_display, NULL, NULL, NULL); - gdk_drag_set_selected_actions (drag, actions, actions); + gdk_drag_set_actions (drag, actions); drag_win32->protocol = protocol; return drag; @@ -1072,7 +1072,7 @@ maybe_emit_action_changed (GdkWin32Drag *drag_win32, if (actions != drag_win32->current_action) { drag_win32->current_action = actions; - gdk_drag_set_action (GDK_DRAG (drag_win32), actions); + gdk_drag_set_selected_action (GDK_DRAG (drag_win32), actions); } } @@ -1088,7 +1088,6 @@ _gdk_win32_local_drag_give_feedback (GdkDrag *drag, GDK_NOTE (DND, g_print ("_gdk_win32_local_drag_give_feedback: 0x%p\n", drag)); - drag->action = actions; maybe_emit_action_changed (drag_win32, actions); } @@ -1107,8 +1106,7 @@ give_feedback (gpointer user_data) GDK_NOTE (DND, g_print ("gdk_dnd_handle_drag_status: 0x%p\n", drag)); - drag->action = action_for_drop_effect (feedback->received_drop_effect); - maybe_emit_action_changed (drag_win32, drag->action); + maybe_emit_action_changed (drag_win32, action_for_drop_effect (feedback->received_drop_effect)); } free_queue_item (&feedback->base); @@ -1928,7 +1926,7 @@ gdk_win32_local_drag_motion (GdkDrag *drag, _gdk_win32_drag_action_to_string (possible_actions), dest_window, drag_win32->dest_window, drop, drag, _gdk_win32_drag_action_to_string (actions), - _gdk_win32_drag_action_to_string (drag->action))); + _gdk_win32_drag_action_to_string (gdk_drag_get_selected_action (drag)))); if (drag_win32->dest_window != dest_window) { @@ -1973,7 +1971,7 @@ gdk_win32_local_drag_motion (GdkDrag *drag, (drop != NULL && drag_win32->drag_status == GDK_DRAG_STATUS_DRAG) ? "TRUE" : "FALSE", drag, _gdk_win32_drag_action_to_string (gdk_drag_get_actions (drag)), - _gdk_win32_drag_action_to_string (drag->action))); + _gdk_win32_drag_action_to_string (gdk_drag_get_selected_action (drag)))); return (drop != NULL && drag_win32->drag_status == GDK_DRAG_STATUS_DRAG); } @@ -2556,16 +2554,6 @@ gdk_win32_drag_handle_event (GdkDrag *drag, return FALSE; } -void -gdk_win32_drag_action_changed (GdkDrag *drag, - GdkDragAction action) -{ - GdkCursor *cursor; - - cursor = gdk_drag_get_cursor (drag, action); - gdk_drag_set_cursor (drag, cursor); -} - static GdkSurface * gdk_win32_drag_get_drag_surface (GdkDrag *drag) { @@ -2611,5 +2599,4 @@ gdk_win32_drag_class_init (GdkWin32DragClass *klass) drag_class->cancel = gdk_win32_drag_cancel; drag_class->drop_performed = gdk_win32_drag_drop_performed; drag_class->handle_event = gdk_win32_drag_handle_event; - drag_class->action_changed = gdk_win32_drag_action_changed; }