[Bf-blender-cvs] [68f677e] master: Fix OS X user preferences open crash when changing virtual pixel size.
Brecht Van Lommel
noreply at git.blender.org
Tue Oct 27 20:06:25 CET 2015
Commit: 68f677e655e35293e173d779fab0eeaddfc166e6
Author: Brecht Van Lommel
Date: Tue Oct 27 20:03:20 2015 +0100
Branches: master
https://developer.blender.org/rB68f677e655e35293e173d779fab0eeaddfc166e6
Fix OS X user preferences open crash when changing virtual pixel size.
The separate window state setting caused a crash due to doing live resize code
redrawing a window that has not yet been fully initialized.
===================================================================
M source/blender/windowmanager/intern/wm_window.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 22a7027..31998df 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -412,7 +412,12 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm
ghostwin = GHOST_CreateWindow(g_system, title,
win->posx, posy, win->sizex, win->sizey,
+#ifdef __APPLE__
+ /* we agreed to not set any fullscreen or iconized state on startup */
+ GHOST_kWindowStateNormal,
+#else
(GHOST_TWindowState)win->windowstate,
+#endif
GHOST_kDrawingContextTypeOpenGL,
glSettings);
@@ -431,11 +436,6 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm
if (win->eventstate == NULL)
win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state");
-#ifdef __APPLE__
- /* set the state here, else OSX would not recognize changed screen resolution */
- /* we agreed to not set any fullscreen or iconized state on startup */
- GHOST_SetWindowState(ghostwin, GHOST_kWindowStateNormal);
-#endif
/* store actual window size in blender window */
bounds = GHOST_GetClientBounds(win->ghostwin);
win->sizex = GHOST_GetWidthRectangle(bounds);
More information about the Bf-blender-cvs
mailing list