set pid property on linux

This commit is contained in:
Adam D. Ruppe 2016-08-19 23:41:37 -04:00
parent 92c5916e56
commit 74a24eb722
1 changed files with 16 additions and 0 deletions

View File

@ -5226,6 +5226,22 @@ version(X11) {
| EventMask.ButtonReleaseMask | EventMask.ButtonReleaseMask
); );
// set the pid property for lookup later by window managers
// a standard convenience
import core.sys.posix.unistd;
uint pid = getpid();
XChangeProperty(
display,
impl.window,
GetAtom!"_NET_WM_PID"(display),
XA_CARDINAL,
32 /* bits */,
0 /*PropModeReplace*/,
&pid,
1);
XMapWindow(display, window); XMapWindow(display, window);
} }