From a1399426c3b5602bbfb0698e64895733f7adb07b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 15 Jun 2015 14:38:13 +0200 Subject: [PATCH] Removed superfluous X11 window struct member. --- src/x11_platform.h | 2 -- src/x11_window.c | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/x11_platform.h b/src/x11_platform.h index 214f2515..62ba36b9 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -87,8 +87,6 @@ typedef struct _GLFWwindowX11 Window handle; XIC ic; - GLboolean 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 e32cca0a..c4f2cef4 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -335,8 +335,6 @@ static GLboolean createWindow(_GLFWwindow* window, window->x11.handle, CWOverrideRedirect, &attributes); - - window->x11.overrideRedirect = GL_TRUE; } } @@ -799,7 +797,7 @@ static void enterFullscreenMode(_GLFWwindow* window) _glfw.x11.NET_WM_STATE_FULLSCREEN, 0, 1, 0); } - else if (window->x11.overrideRedirect) + else { // In override-redirect mode we have divorced ourselves from the // window manager, so we need to do everything manually @@ -1544,7 +1542,7 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) { _glfwSetVideoMode(window->monitor, &window->videoMode); - if (window->x11.overrideRedirect) + if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN) { GLFWvidmode mode; _glfwPlatformGetVideoMode(window->monitor, &mode); @@ -1649,7 +1647,7 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, void _glfwPlatformIconifyWindow(_GLFWwindow* window) { - if (window->x11.overrideRedirect) + if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN) { // Override-redirect windows cannot be iconified or restored, as those // tasks are performed by the window manager @@ -1664,7 +1662,7 @@ void _glfwPlatformIconifyWindow(_GLFWwindow* window) void _glfwPlatformRestoreWindow(_GLFWwindow* window) { - if (window->x11.overrideRedirect) + if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN) { // Override-redirect windows cannot be iconified or restored, as those // tasks are performed by the window manager