diff --git a/src/x11_init.c b/src/x11_init.c index e1c17a3f..7f7587c9 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -460,6 +460,10 @@ static void detectEWMH(void) getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PID"); _glfw.x11.NET_WM_PING = getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PING"); + _glfw.x11.NET_WM_WINDOW_TYPE = + getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_WINDOW_TYPE"); + _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL = + getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_WINDOW_TYPE_NORMAL"); _glfw.x11.NET_ACTIVE_WINDOW = getSupportedAtom(supportedAtoms, atomCount, "_NET_ACTIVE_WINDOW"); _glfw.x11.NET_FRAME_EXTENTS = diff --git a/src/x11_platform.h b/src/x11_platform.h index 92957587..a12374aa 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -170,6 +170,8 @@ typedef struct _GLFWlibraryX11 Atom NET_WM_ICON; Atom NET_WM_PID; Atom NET_WM_PING; + Atom NET_WM_WINDOW_TYPE; + Atom NET_WM_WINDOW_TYPE_NORMAL; Atom NET_WM_STATE; Atom NET_WM_STATE_ABOVE; Atom NET_WM_STATE_FULLSCREEN; diff --git a/src/x11_window.c b/src/x11_window.c index 8fc8e2cd..03cc3749 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -411,6 +411,14 @@ static GLFWbool createWindow(_GLFWwindow* window, (unsigned char*) &pid, 1); } + if (_glfw.x11.NET_WM_WINDOW_TYPE && _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL) + { + Atom type = _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL; + XChangeProperty(_glfw.x11.display, window->x11.handle, + _glfw.x11.NET_WM_WINDOW_TYPE, XA_ATOM, 32, + PropModeReplace, (unsigned char*) &type, 1); + } + // Set ICCCM WM_HINTS property { XWMHints* hints = XAllocWMHints();