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.
This commit is contained in:
Julian Eisel 2019-09-06 16:46:36 +02:00
parent 24d05b5ff9
commit 83a7d98a32
Notes: blender-bot 2023-02-14 10:32:59 +01:00
Referenced by issue #70646, EEVEE compilation error in displacement tree
Referenced by issue #69581, Error popups spawned from new FileBrowser are "swallowed" (e.g. Addon import/export errors)
1 changed files with 3 additions and 0 deletions

View File

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