From e51e27fcabcbf0aa7c5c540250d549739fe82e3d Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 28 Feb 2016 16:05:02 +0100 Subject: [PATCH] Add back tracking of X11 override-redirect --- src/x11_platform.h | 2 ++ src/x11_window.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/x11_platform.h b/src/x11_platform.h index 8d791f07..caad2530 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -116,6 +116,8 @@ typedef struct _GLFWwindowX11 Window handle; XIC ic; + GLFWbool overrideRedirect; + // Cached position and size used to filter out duplicate events int width, height; int xpos, ypos; diff --git a/src/x11_window.c b/src/x11_window.c index ad007d9f..3d5dd980 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -318,6 +318,8 @@ static GLFWbool createWindow(_GLFWwindow* window, window->x11.handle, CWOverrideRedirect, &attributes); + + window->x11.overrideRedirect = GLFW_TRUE; } } else @@ -1737,7 +1739,7 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, void _glfwPlatformIconifyWindow(_GLFWwindow* window) { - if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN) + if (window->x11.overrideRedirect) { // Override-redirect windows cannot be iconified or restored, as those // tasks are performed by the window manager @@ -1752,7 +1754,7 @@ void _glfwPlatformIconifyWindow(_GLFWwindow* window) void _glfwPlatformRestoreWindow(_GLFWwindow* window) { - if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN) + if (window->x11.overrideRedirect) { // Override-redirect windows cannot be iconified or restored, as those // tasks are performed by the window manager