From 3133a422731f68721e7cfff42db2ba334e3fa660 Mon Sep 17 00:00:00 2001 From: Cyril Pichard Date: Wed, 12 Nov 2014 16:59:19 +0100 Subject: [PATCH] Fixed windows position in fullscreen mode with several monitors and no WM --- src/x11_window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index 8fa6c9729..3cd007732 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -777,14 +777,15 @@ static void enterFullscreenMode(_GLFWwindow* window) { // In override-redirect mode we have divorced ourselves from the // window manager, so we need to do everything manually - + int x,y; GLFWvidmode mode; + _glfwPlatformGetMonitorPos(window->monitor, &x, &y); _glfwPlatformGetVideoMode(window->monitor, &mode); XRaiseWindow(_glfw.x11.display, window->x11.handle); XSetInputFocus(_glfw.x11.display, window->x11.handle, 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, mode.width, mode.height); }