Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulianeisel <julian_eisel@web.de>2015-01-14 03:29:17 +0300
committerjulianeisel <julian_eisel@web.de>2015-01-14 03:29:17 +0300
commitf19013158ab51dd8a9ed7a0121c2858c310f8286 (patch)
tree8a91133e61bb40091295405f6a569f69f9a936fb /source/blender/windowmanager
parent3d503ea8d6fa8ff397565b90cb53a4e211aef847 (diff)
Workaround/Fix T43139: Calling bpy.ops.screen.screen_full_area() multiple times in python console causes Blender to crash
This was sort of a chicken<->egg dilemma, because after a maximized screen was restored, the screen handling used region coordinates which weren't updated yet. I'm still not sure why, but this resulted in area coords that go beond INT_MAX. To fix this I made sure the first screen handling after restoring a maximized screen is skipped, so that it's delayed to the next call of wm_event_do_handlers (since this is called from main loop there shouldn't be a noticable delay or any handling glitches).
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index f50744bf99e..d5c88ff156c 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2318,6 +2318,14 @@ void wm_event_do_handlers(bContext *C)
}
for (sa = win->screen->areabase.first; sa; sa = sa->next) {
+ /* after restoring a screen from SCREENMAXIMIZED we have to wait
+ * with the screen handling till the region coordinates are updated */
+ if (win->screen->skip_handling == true) {
+ /* restore for the next iteration of wm_event_do_handlers */
+ win->screen->skip_handling = false;
+ break;
+ }
+
if (wm_event_inside_i(event, &sa->totrct)) {
CTX_wm_area_set(C, sa);