fix that stereo shutter glasses for nVidia setups did not engage. We lose the ability to have child windows as the WS_POPUP style doesn't play nice with them, but thats a small price to pay as we estimate them to be rare for stereo displays. Thanks Markus Israelsson
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1839 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
b50503822a
commit
a2fef0a9bb
@ -1626,6 +1626,7 @@ void fgPlatformPosResZordWork(SFG_Window* window, unsigned int workMask)
|
|||||||
RECT rect;
|
RECT rect;
|
||||||
HMONITOR hMonitor;
|
HMONITOR hMonitor;
|
||||||
MONITORINFO mi;
|
MONITORINFO mi;
|
||||||
|
DWORD newStyle;
|
||||||
|
|
||||||
/* save current window rect, style, exstyle and maximized state */
|
/* save current window rect, style, exstyle and maximized state */
|
||||||
window->State.pWState.OldMaximized = !!IsZoomed(window->Window.Handle);
|
window->State.pWState.OldMaximized = !!IsZoomed(window->Window.Handle);
|
||||||
@ -1641,8 +1642,14 @@ void fgPlatformPosResZordWork(SFG_Window* window, unsigned int workMask)
|
|||||||
window->State.pWState.OldStyleEx = GetWindowLong(window->Window.Handle, GWL_EXSTYLE);
|
window->State.pWState.OldStyleEx = GetWindowLong(window->Window.Handle, GWL_EXSTYLE);
|
||||||
|
|
||||||
/* remove decorations from style */
|
/* remove decorations from style */
|
||||||
SetWindowLong(window->Window.Handle, GWL_STYLE,
|
newStyle = window->State.pWState.OldStyle & ~(WS_CAPTION | WS_THICKFRAME);
|
||||||
window->State.pWState.OldStyle & ~(WS_CAPTION | WS_THICKFRAME));
|
if (fgState.DisplayMode & GLUT_STEREO)
|
||||||
|
{
|
||||||
|
/* stereo mode does not engage on nVidia stereo buffers. This kills child
|
||||||
|
windows, but we make the guess that those are rare for stereo windows. */
|
||||||
|
newStyle |= WS_POPUP;
|
||||||
|
}
|
||||||
|
SetWindowLong(window->Window.Handle, GWL_STYLE, newStyle);
|
||||||
SetWindowLong(window->Window.Handle, GWL_EXSTYLE,
|
SetWindowLong(window->Window.Handle, GWL_EXSTYLE,
|
||||||
window->State.pWState.OldStyleEx & ~(WS_EX_DLGMODALFRAME |
|
window->State.pWState.OldStyleEx & ~(WS_EX_DLGMODALFRAME |
|
||||||
WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
|
WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
|
||||||
|
Reference in New Issue
Block a user