1
0
Fork 0
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:
Camilla Berglund 2013-05-02 16:31:27 +02:00
parent 5cf56a442c
commit be28914732
3 changed files with 14 additions and 0 deletions

View File

@ -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");

View File

@ -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;

View File

@ -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();