diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-04 15:33:26 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-04 15:33:26 +0300 |
commit | a10cac413e3c612ce2aaa93cf71348df3966859c (patch) | |
tree | 371289da3cd51e849bd6073e46a59b112519deef /source/blender/windowmanager | |
parent | ff286a9fcfd13f264258f807dcea8f9aa5328d96 (diff) |
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.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 4 |
1 files changed, 4 insertions, 0 deletions
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. */ |