#endif /* TARGET_HOST_MS_WINDOWS */
+#ifdef WM_TOUCH
+ typedef BOOL (WINAPI *pRegisterTouchWindow)(HWND,ULONG);
+ static pRegisterTouchWindow fghRegisterTouchWindow = (pRegisterTouchWindow)0xDEADBEEF;
+#endif
/* pushing attribute/value pairs into an array */
#define ATTRIB(a) attributes[where++]=(a)
window->Window.Context
);
+ /* register extension events _before_ window is mapped */
+ #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
+ fgRegisterDevices( fgDisplay.Display, &(window->Window.Handle) );
+ #endif
+
XMapWindow( fgDisplay.Display, window->Window.Handle );
XFree(visualInfo);
else if ( fgState.DisplayMode & GLUT_BORDERLESS )
{
SetWindowLong ( window->Window.Handle, GWL_STYLE,
- WindowStyle & ~(WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX));
+ WindowStyle & ~(WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_DLGFRAME | WS_SIZEBOX));
}
/* SetWindowPos(window->Window.Handle, NULL, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); */
+ /* Enable multitouch: additional flag TWF_FINETOUCH, TWF_WANTPALM */
+ #ifdef WM_TOUCH
+ if (fghRegisterTouchWindow == (pRegisterTouchWindow)0xDEADBEEF)
+ fghRegisterTouchWindow = (pRegisterTouchWindow)GetProcAddress(GetModuleHandle("user32"),"RegisterTouchWindow");
+ if (fghRegisterTouchWindow)
+ fghRegisterTouchWindow( window->Window.Handle, TWF_FINETOUCH | TWF_WANTPALM );
+ #endif
#if defined(_WIN32_WCE)
ShowWindow( window->Window.Handle, SW_SHOW );
*/
void fgCloseWindow( SFG_Window* window )
{
+ /* if we're in gamemode and we're closing the gamemode window,
+ * call glutLeaveGameMode first to make sure the gamemode is
+ * properly closed before closing the window
+ */
+ if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==window->ID)
+ glutLeaveGameMode();
+
#if TARGET_HOST_POSIX_X11
if( window->Window.Context )