Fixing bug report 3021598 by modifying "glutSetWindow" under Windows so that it only releases and gets the device context if the window is being set to a new window

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@888 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-01-25 05:17:12 +00:00
parent b542912840
commit dc9123210d

View File

@ -812,6 +812,8 @@ void fgSetWindow ( SFG_Window *window )
);
}
#elif TARGET_HOST_MS_WINDOWS
if ( window != fgStructure.CurrentWindow )
{
if( fgStructure.CurrentWindow )
ReleaseDC( fgStructure.CurrentWindow->Window.Handle,
fgStructure.CurrentWindow->Window.Device );
@ -824,6 +826,7 @@ void fgSetWindow ( SFG_Window *window )
window->Window.Context
);
}
}
#endif
fgStructure.CurrentWindow = window;
}