[Bf-blender-cvs] [83a7d98a325] master: Fix: File browser report popups not showing up

Julian Eisel noreply at git.blender.org
Fri Sep 6 16:55:32 CEST 2019


Commit: 83a7d98a325232bef85bd7c66dccf911248abf05
Author: Julian Eisel
Date:   Fri Sep 6 16:46:36 2019 +0200
Branches: master
https://developer.blender.org/rB83a7d98a325232bef85bd7c66dccf911248abf05

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.

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

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

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

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) {



More information about the Bf-blender-cvs mailing list