guiApp.SetAppFocus(false);
SetNETWMState((X11Window)window.windowHandle, true, remove, atoms[_net_wm_state_fullscreen], 0);
XIconifyWindow(xGlobalDisplay, (X11Window)window.windowHandle, DefaultScreen(xGlobalDisplay));
+ if(acquiredInputWindow)
+ XInterface::SetMousePosition(guiApp.acquiredMouseX, guiApp.acquiredMouseY);
}
code.alt = true;
}
if(fullScreenMode)
{
+ if(acquiredInputWindow)
+ {
+ GetMousePosition(&guiApp.acquiredMouseX, &guiApp.acquiredMouseY);
+ lastMouse = { window.size.w/2, window.size.h/2 };
+ SetMousePosition(lastMouse.x, lastMouse.y);
+ }
XRaiseWindow(xGlobalDisplay, (X11Window)window.windowHandle);
SetNETWMState((X11Window)window.windowHandle, true, add, atoms[_net_wm_state_fullscreen], 0);
XGrabKeyboard(xGlobalDisplay, (X11Window)window.windowHandle, False, GrabModeAsync, GrabModeAsync, CurrentTime);
break;
}
- if((X11Window)window.windowHandle == activeWindow)
+ if(fullScreenMode || (X11Window)window.windowHandle == activeWindow)
guiApp.SetAppFocus(false);
if(fullScreenMode)
{
- SetNETWMState((X11Window)window.windowHandle, true, remove, atoms[_net_wm_state_fullscreen], 0);
- XUngrabKeyboard(xGlobalDisplay, CurrentTime);
- XIconifyWindow(xGlobalDisplay, (X11Window)window.windowHandle, DefaultScreen(xGlobalDisplay));
+ //XUngrabKeyboard(xGlobalDisplay, CurrentTime);
+ //SetNETWMState((X11Window)window.windowHandle, true, remove, atoms[_net_wm_state_fullscreen], 0);
+ //XIconifyWindow(xGlobalDisplay, (X11Window)window.windowHandle, DefaultScreen(xGlobalDisplay));
break;
}