[Bf-blender-cvs] [a10cac413e3] master: Fix the menu popup location when dropping blend files under Wayland

Campbell Barton noreply at git.blender.org
Thu Aug 4 14:34:20 CEST 2022


Commit: a10cac413e3c612ce2aaa93cf71348df3966859c
Author: Campbell Barton
Date:   Thu Aug 4 22:33:26 2022 +1000
Branches: master
https://developer.blender.org/rBa10cac413e3c612ce2aaa93cf71348df3966859c

Fix the menu popup location when dropping blend files under Wayland

Even though the event's location matched the drop event,
the `wmWindow.eventstate` was not updated which was used for the
pop-up menu location.

===================================================================

M	source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index a1ebe1fc76f..a5690b52a5a 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1367,6 +1367,10 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt
         event.xy[0] = ddd->x;
         event.xy[1] = ddd->y;
 
+        /* The values from #wm_window_update_eventstate may not match (under WAYLAND they don't)
+         * Write this into the event state. */
+        copy_v2_v2_int(win->eventstate->xy, event.xy);
+
         event.flag = 0;
 
         /* No context change! C->wm->windrawable is drawable, or for area queues. */



More information about the Bf-blender-cvs mailing list