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);
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
sendEventToWM(window,
|
||||
@ -803,20 +815,6 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
||||
_glfw.x11.NET_WM_STATE_FULLSCREEN,
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user