mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Always pre-position X11 full screen windows.
This commit is contained in:
parent
21ce21cc07
commit
c77edaee34
|
@ -767,6 +767,18 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
||||||
PropModeReplace, (unsigned char*) &value, 1);
|
PropModeReplace, (unsigned char*) &value, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Position the window over its monitor
|
||||||
|
{
|
||||||
|
int xpos, ypos;
|
||||||
|
GLFWvidmode mode;
|
||||||
|
|
||||||
|
_glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
|
||||||
|
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
||||||
|
|
||||||
|
XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
|
||||||
|
xpos, ypos, mode.width, mode.height);
|
||||||
|
}
|
||||||
|
|
||||||
if (_glfw.x11.xinerama.available && _glfw.x11.NET_WM_FULLSCREEN_MONITORS)
|
if (_glfw.x11.xinerama.available && _glfw.x11.NET_WM_FULLSCREEN_MONITORS)
|
||||||
{
|
{
|
||||||
sendEventToWM(window,
|
sendEventToWM(window,
|
||||||
|
@ -803,20 +815,6 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
||||||
_glfw.x11.NET_WM_STATE_FULLSCREEN,
|
_glfw.x11.NET_WM_STATE_FULLSCREEN,
|
||||||
0, 1, 0);
|
0, 1, 0);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// In override-redirect mode we have divorced ourselves from the
|
|
||||||
// window manager, so we need to do everything manually
|
|
||||||
int xpos, ypos;
|
|
||||||
GLFWvidmode mode;
|
|
||||||
|
|
||||||
_glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
|
|
||||||
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
|
||||||
|
|
||||||
XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);
|
|
||||||
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
|
||||||
mode.width, mode.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leave full screen mode
|
// Leave full screen mode
|
||||||
|
|
Loading…
Reference in New Issue
Block a user