This commit is contained in:
Camilla Berglund 2015-06-16 12:10:20 +02:00
parent 2cc3c16ab1
commit 3365139a6c

View File

@ -317,7 +317,7 @@ static GLboolean createWindow(_GLFWwindow* window,
(XPointer) window);
}
if (window->monitor)
if (wndconfig->monitor)
{
if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN)
{
@ -337,6 +337,21 @@ static GLboolean createWindow(_GLFWwindow* window,
&attributes);
}
}
else
{
if (wndconfig->floating)
{
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_ABOVE)
{
sendEventToWM(window,
_glfw.x11.NET_WM_STATE,
_NET_WM_STATE_ADD,
_glfw.x11.NET_WM_STATE_ABOVE,
0, 1, 0);
}
}
}
// Declare the WM protocols supported by GLFW
{
@ -457,18 +472,6 @@ static GLboolean createWindow(_GLFWwindow* window,
PropModeReplace, (unsigned char*) &version, 1);
}
if (wndconfig->floating && !wndconfig->monitor)
{
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_ABOVE)
{
sendEventToWM(window,
_glfw.x11.NET_WM_STATE,
_NET_WM_STATE_ADD,
_glfw.x11.NET_WM_STATE_ABOVE,
0, 1, 0);
}
}
_glfwPlatformSetWindowTitle(window, wndconfig->title);
XRRSelectInput(_glfw.x11.display, window->x11.handle,