GHOST: cover now both win and osx case for T39153

This commit is contained in:
Jens Verwiebe
2014-03-13 18:02:50 +01:00
parent 5e56f45a66
commit 36006220c3

View File

@@ -372,16 +372,21 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
if (win->eventstate == NULL)
win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state");
/* set the state */
GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
#ifdef __APPLE__
/* set the state here, else OSX would nor recignize changed screen resolution */
GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
#endif
/* store actual window size in blender window */
bounds = GHOST_GetClientBounds(win->ghostwin);
win->sizex = GHOST_GetWidthRectangle(bounds);
win->sizey = GHOST_GetHeightRectangle(bounds);
GHOST_DisposeRectangle(bounds);
#ifndef __APPLE__
/* set the state here, so minimized state comes up correct on windows */
GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
#endif
/* until screens get drawn, make it nice gray */
glClearColor(0.55, 0.55, 0.55, 0.0);
/* Crash on OSS ATI: bugs.launchpad.net/ubuntu/+source/mesa/+bug/656100 */