Remove superfluous X11 library struct member.

master
Camilla Berglund ago%!(EXTRA string=10 years)
parent 1ee4c4ba62
commit bdcffa90eb
  1. 2
      src/x11_init.c
  2. 2
      src/x11_platform.h
  3. 37
      src/x11_window.c

@ -459,8 +459,6 @@ static void detectEWMH(void)
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_BYPASS_COMPOSITOR"); getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_BYPASS_COMPOSITOR");
XFree(supportedAtoms); XFree(supportedAtoms);
_glfw.x11.hasEWMH = GL_TRUE;
} }
// Initialize X11 display and look for supported X11 extensions // Initialize X11 display and look for supported X11 extensions

@ -115,8 +115,6 @@ typedef struct _GLFWlibraryX11
XContext context; XContext context;
// XIM input method // XIM input method
XIM im; XIM im;
// True if window manager supports EWMH
GLboolean hasEWMH;
// Most recent error code received by X error handler // Most recent error code received by X error handler
int errorCode; int errorCode;
// Clipboard string (while the selection is owned) // Clipboard string (while the selection is owned)

@ -317,24 +317,27 @@ static GLboolean createWindow(_GLFWwindow* window,
(XPointer) window); (XPointer) window);
} }
if (window->monitor && !_glfw.x11.hasEWMH) if (window->monitor)
{ {
// This is the butcher's way of removing window decorations if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_FULLSCREEN)
// Setting the override-redirect attribute on a window makes the window {
// manager ignore the window completely (ICCCM, section 4) // This is the butcher's way of removing window decorations
// The good thing is that this makes undecorated full screen windows // Setting the override-redirect attribute on a window makes the
// easy to do; the bad thing is that we have to do everything manually // window manager ignore the window completely (ICCCM, section 4)
// and some things (like iconify/restore) won't work at all, as those // The good thing is that this makes undecorated full screen windows
// are tasks usually performed by the window manager // easy to do; the bad thing is that we have to do everything
// manually and some things (like iconify/restore) won't work at
XSetWindowAttributes attributes; // all, as those are tasks usually performed by the window manager
attributes.override_redirect = True;
XChangeWindowAttributes(_glfw.x11.display, XSetWindowAttributes attributes;
window->x11.handle, attributes.override_redirect = True;
CWOverrideRedirect, XChangeWindowAttributes(_glfw.x11.display,
&attributes); window->x11.handle,
CWOverrideRedirect,
window->x11.overrideRedirect = GL_TRUE; &attributes);
window->x11.overrideRedirect = GL_TRUE;
}
} }
// Declare the WM protocols supported by GLFW // Declare the WM protocols supported by GLFW

Loading…
Cancel
Save