From ca8912375c93af2017c48d330f402eeb60d72172 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 12 Aug 2015 17:21:46 +0200 Subject: [PATCH] Fix Motif hints being set for X11 full screen Related to #575. --- README.md | 1 + src/x11_window.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 631a6540..ccd0f268 100644 --- a/README.md +++ b/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 diff --git a/src/x11_window.c b/src/x11_window.c index 8364a7b6..62e8a200 100644 --- a/src/x11_window.c +++ b/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)