diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-09-06 17:46:36 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2019-09-12 04:13:02 +0300 |
commit | 13194fc36a8335d848e8f1c91cc366c5bb994aa1 (patch) | |
tree | 501079e1ff566185ac6f1dd3fb923e3c21106a7b | |
parent | 1a0aa336cb4f932141873c2dcb439c503592d8af (diff) |
Fix: File browser report popups not showing up
Popup would be closed immediately after creating, because of incorrect
mouse coordinates stored in window (popup is set to close if mouse is
some distance away from it).
Completes fix for T69581.
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 7216278c9f9..2e3abfd9944 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2397,6 +2397,9 @@ static int wm_handler_fileselect_do(bContext *C, CTX_wm_window_set(C, ctx_win); // wm_window_close() NULLs. /* Some operators expect a drawable context (for EVT_FILESELECT_EXEC) */ wm_window_make_drawable(wm, ctx_win); + /* Ensure correct cursor positon, otherwise, popups may close immediately after + * opening (UI_BLOCK_MOVEMOUSE_QUIT) */ + wm_get_cursor_position(ctx_win, &ctx_win->eventstate->x, &ctx_win->eventstate->y); wm->winactive = ctx_win; /* Reports use this... */ } else if (file_sa->full) { |