mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Fixed position for full screen override redirect.
This commit is contained in:
parent
5c003d3fbe
commit
cc10527706
|
@ -777,14 +777,15 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
// In override-redirect mode we have divorced ourselves from the
|
// In override-redirect mode we have divorced ourselves from the
|
||||||
// window manager, so we need to do everything manually
|
// window manager, so we need to do everything manually
|
||||||
|
int x,y;
|
||||||
GLFWvidmode mode;
|
GLFWvidmode mode;
|
||||||
|
_glfwPlatformGetMonitorPos(window->monitor, &x, &y);
|
||||||
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
||||||
|
|
||||||
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
||||||
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
||||||
RevertToParent, CurrentTime);
|
RevertToParent, CurrentTime);
|
||||||
XMoveWindow(_glfw.x11.display, window->x11.handle, 0, 0);
|
XMoveWindow(_glfw.x11.display, window->x11.handle, x, y);
|
||||||
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
||||||
mode.width, mode.height);
|
mode.width, mode.height);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user