From e11a5e397324e2977323fd1bcb1302ef010fb74b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 19 Jun 2013 13:45:28 +0200 Subject: [PATCH] Fixed resizing for full screen override redirect. --- README.md | 2 ++ src/x11_window.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ec443a17..b68e1be7 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,8 @@ See the [GLFW 3.0 documentation](http://www.glfw.org/docs/3.0/). - Bugfix: The `-Wall` flag was not used with Clang and other GCC compatibles - Bugfix: The default for `GLFW_ALPHA_BITS` was set to zero + - [X11] Bugfix: Override-redirect windows were resized to the desired instead + of the actual resolution of the selected video mode ## Contact diff --git a/src/x11_window.c b/src/x11_window.c index 711f2d2a..4d1af540 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1026,15 +1026,15 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) if (window->monitor) { + _glfwSetVideoMode(window->monitor, &window->videoMode); + if (window->x11.overrideRedirect) { GLFWvidmode mode; _glfwPlatformGetVideoMode(window->monitor, &mode); XResizeWindow(_glfw.x11.display, window->x11.handle, - window->videoMode.width, window->videoMode.height); + mode.width, mode.height); } - - _glfwSetVideoMode(window->monitor, &window->videoMode); } else XResizeWindow(_glfw.x11.display, window->x11.handle, width, height);