2
0
Эх сурвалжийг харах

Fix Motif hints being set for X11 full screen

Related to #575.
Camilla Berglund 10 жил өмнө
parent
commit
ca8912375c
2 өөрчлөгдсөн 15 нэмэгдсэн , 14 устгасан
  1. 1 0
      README.md
  2. 14 14
      src/x11_window.c

+ 1 - 0
README.md

@@ -88,6 +88,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
  - [X11] Bugfix: The original video mode was not restored on iconification of
                  full screen windows
  - [X11] Bugfix: `GLFW_ARROW_CURSOR` selected the wrong cursor image
+ - [X11] Bugfix: The `GLFW_DECORATED` hint was not ignored for full screen
  - [WGL] Made all WGL functions dynamically loaded
  - [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
  - [WGL] Bugfix: Swap interval was ignored when DWM was enabled

+ 14 - 14
src/x11_window.c

@@ -297,20 +297,6 @@ static GLboolean createWindow(_GLFWwindow* window,
             return GL_FALSE;
         }
 
-        if (!wndconfig->decorated)
-        {
-            MotifWmHints hints;
-            hints.flags = MWM_HINTS_DECORATIONS;
-            hints.decorations = 0;
-
-            XChangeProperty(_glfw.x11.display, window->x11.handle,
-                            _glfw.x11.MOTIF_WM_HINTS,
-                            _glfw.x11.MOTIF_WM_HINTS, 32,
-                            PropModeReplace,
-                            (unsigned char*) &hints,
-                            sizeof(MotifWmHints) / sizeof(long));
-        }
-
         XSaveContext(_glfw.x11.display,
                      window->x11.handle,
                      _glfw.x11.context,
@@ -339,6 +325,20 @@ static GLboolean createWindow(_GLFWwindow* window,
     }
     else
     {
+        if (!wndconfig->decorated)
+        {
+            MotifWmHints hints;
+            hints.flags = MWM_HINTS_DECORATIONS;
+            hints.decorations = 0;
+
+            XChangeProperty(_glfw.x11.display, window->x11.handle,
+                            _glfw.x11.MOTIF_WM_HINTS,
+                            _glfw.x11.MOTIF_WM_HINTS, 32,
+                            PropModeReplace,
+                            (unsigned char*) &hints,
+                            sizeof(MotifWmHints) / sizeof(long));
+        }
+
         if (wndconfig->floating)
         {
             if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_ABOVE)