mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-27 04:28:52 -05:00
Added setting of _NET_WM_PID.
This commit is contained in:
parent
5cf56a442c
commit
be28914732
|
@ -410,6 +410,9 @@ static void detectEWMH(void)
|
||||||
_glfw.x11.NET_WM_ICON_NAME =
|
_glfw.x11.NET_WM_ICON_NAME =
|
||||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_ICON_NAME");
|
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_ICON_NAME");
|
||||||
|
|
||||||
|
_glfw.x11.NET_WM_PID =
|
||||||
|
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PID");
|
||||||
|
|
||||||
_glfw.x11.NET_WM_PING =
|
_glfw.x11.NET_WM_PING =
|
||||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PING");
|
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PING");
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,7 @@ typedef struct _GLFWlibraryX11
|
||||||
Atom WM_DELETE_WINDOW;
|
Atom WM_DELETE_WINDOW;
|
||||||
Atom NET_WM_NAME;
|
Atom NET_WM_NAME;
|
||||||
Atom NET_WM_ICON_NAME;
|
Atom NET_WM_ICON_NAME;
|
||||||
|
Atom NET_WM_PID;
|
||||||
Atom NET_WM_PING;
|
Atom NET_WM_PING;
|
||||||
Atom NET_WM_STATE;
|
Atom NET_WM_STATE;
|
||||||
Atom NET_WM_STATE_FULLSCREEN;
|
Atom NET_WM_STATE_FULLSCREEN;
|
||||||
|
|
|
@ -204,6 +204,16 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_glfw.x11.NET_WM_PID != None)
|
||||||
|
{
|
||||||
|
const pid_t pid = getpid();
|
||||||
|
|
||||||
|
XChangeProperty(_glfw.x11.display, window->x11.handle,
|
||||||
|
_glfw.x11.NET_WM_PID, XA_CARDINAL, 32,
|
||||||
|
PropModeReplace,
|
||||||
|
(unsigned char*) &pid, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// Set ICCCM WM_HINTS property
|
// Set ICCCM WM_HINTS property
|
||||||
{
|
{
|
||||||
XWMHints* hints = XAllocWMHints();
|
XWMHints* hints = XAllocWMHints();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user