From 2dd6d0ce4b6d0b72274234073306982c3122c904 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 25 May 2020 18:33:12 +0200 Subject: Fix T76926: Crash with Full Screen file browser window preference Alternative fix for T75292 & T73579 (see b75ce05c3b0f), that does not cause this crash. The crash happened because cancelling the file browser removes its screen (as in bScreen). Before rBb75ce05c3b0f, the file browser event wouldn't be handled any further then. After it, it would still be passed to other areas, while the screen pointer was dangling. Now the event is only skipped for UI handlers. Reviewed by: Julian Eisel --- source/blender/windowmanager/intern/wm_event_system.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 32b6b8b9c4a..5961c6d807a 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -563,7 +563,7 @@ void wm_event_do_notifiers(bContext *C) static int wm_event_always_pass(const wmEvent *event) { /* some events we always pass on, to ensure proper communication */ - return ISTIMER(event->type) || (event->type == WINDEACTIVATE) || (event->type == EVT_FILESELECT); + return ISTIMER(event->type) || (event->type == WINDEACTIVATE); } /** \} */ @@ -602,6 +602,12 @@ static int wm_handler_ui_call(bContext *C, } } + /* Don't block file-select events. Those are triggered by a separate file browser window. + * See T75292. */ + if (event->type == EVT_FILESELECT) { + return WM_UI_HANDLER_CONTINUE; + } + /* we set context to where ui handler came from */ if (handler->context.area) { CTX_wm_area_set(C, handler->context.area); -- cgit v1.2.3