( ( ( GetKeyState( VK_LCONTROL ) < 0 ) ||
( GetKeyState( VK_RCONTROL ) < 0 )) ? GLUT_ACTIVE_CTRL : 0 ) |
( ( ( GetKeyState( VK_LMENU ) < 0 ) ||
- ( GetKeyState( VK_RMENU ) < 0 )) ? GLUT_ACTIVE_ALT : 0 );
+ ( GetKeyState( VK_RMENU ) < 0 )) ? GLUT_ACTIVE_ALT : 0 ) |
+ ( ( ( GetKeyState( VK_LWIN ) < 0 ) ||
+ ( GetKeyState( VK_RWIN ) < 0 )) ? GLUT_ACTIVE_SUPER : 0 );
}
/* Check whether a button (VK_*BUTTON) is currently depressed. Returns
FG_KEY( VK_RIGHT, GLUT_KEY_RIGHT );
FG_KEY( VK_DOWN, GLUT_KEY_DOWN );
FG_KEY( VK_INSERT, GLUT_KEY_INSERT );
+ FG_KEY( VK_LWIN, GLUT_KEY_SUPER_L );
+ FG_KEY( VK_RWIN, GLUT_KEY_SUPER_R );
/* handle control, alt and shift. For GLUT, we want to distinguish between left and right presses.
* The VK_L* & VK_R* left and right Alt, Ctrl and Shift virtual keys are however only used as parameters to GetAsyncKeyState() and GetKeyState()
RECT rect;
HMONITOR hMonitor;
MONITORINFO mi;
+ DWORD newStyle;
/* save current window rect, style, exstyle and maximized state */
window->State.pWState.OldMaximized = !!IsZoomed(window->Window.Handle);
window->State.pWState.OldStyleEx = GetWindowLong(window->Window.Handle, GWL_EXSTYLE);
/* remove decorations from style */
- SetWindowLong(window->Window.Handle, GWL_STYLE,
- window->State.pWState.OldStyle & ~(WS_CAPTION | WS_THICKFRAME));
+ newStyle = 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,
window->State.pWState.OldStyleEx & ~(WS_EX_DLGMODALFRAME |
WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));