mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Add support for EWMH _NET_WM_WINDOW_TYPE
This commit is contained in:
parent
86751b42a6
commit
ea73ccf22d
|
@ -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 =
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user