Fix Motif hints being set for X11 full screen

Related to #575.
This commit is contained in:
Camilla Berglund 2015-08-12 17:21:46 +02:00
parent 6b8d490249
commit ca8912375c
2 changed files with 15 additions and 14 deletions

View File

@ -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 - [X11] Bugfix: The original video mode was not restored on iconification of
full screen windows full screen windows
- [X11] Bugfix: `GLFW_ARROW_CURSOR` selected the wrong cursor image - [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] Made all WGL functions dynamically loaded
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option - [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled - [WGL] Bugfix: Swap interval was ignored when DWM was enabled

View File

@ -297,20 +297,6 @@ static GLboolean createWindow(_GLFWwindow* window,
return GL_FALSE; 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, XSaveContext(_glfw.x11.display,
window->x11.handle, window->x11.handle,
_glfw.x11.context, _glfw.x11.context,
@ -339,6 +325,20 @@ static GLboolean createWindow(_GLFWwindow* window,
} }
else 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 (wndconfig->floating)
{ {
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_ABOVE) if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_ABOVE)