From bbf87c4f750992f47f514733e3a7d33573f5c860 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Jul 2022 13:33:02 +1000 Subject: Fix T99737: Dropping files fails with Wayland Drop events ignored the cursor coordinates, under the assumption that cursor motion events would also be sent to update the cursor location. This depended on the behavior of the compositor, it failed for Sway but worked for Gnome-shell & River. Resolve by making use of the drop events cursor coordinates. --- source/blender/windowmanager/intern/wm_window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 70640eda605..d2182f759e5 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1362,6 +1362,11 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt event.type = MOUSEMOVE; event.val = KM_NOTHING; copy_v2_v2_int(event.prev_xy, event.xy); + + wm_cursor_position_from_ghost_screen_coords(win, &ddd->x, &ddd->y); + event.xy[0] = ddd->x; + event.xy[1] = ddd->y; + event.flag = 0; /* No context change! C->wm->windrawable is drawable, or for area queues. */ -- cgit v1.2.3