浏览代码

Fixed resizing for full screen override redirect.

Camilla Berglund 12 年之前
父节点
当前提交
e11a5e3973
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 2 0
      README.md
  2. 3 3
      src/x11_window.c

+ 2 - 0
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

+ 3 - 3
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);