diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-09-06 20:26:10 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-09-06 20:26:10 +0200 |
commit | e6167bc9300d497b1f2edf3a307164081e24f2bd (patch) | |
tree | 5688a069d1c3ff007fe1b73b04859957e9ead390 /src/window | |
parent | 7a80f0de04c3b07d88ba2ab3e51544d38fe924f6 (diff) |
Set NET_WM_PID
Diffstat (limited to 'src/window')
-rw-r--r-- | src/window/window.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/window/window.c b/src/window/window.c index 08c4585..c03d681 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -331,6 +331,13 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window context->net_wm_ping_atom }; XSetWMProtocols(context->connection, self->window, wm_protocol_atoms, 2); + + if(context->net_wm_pid_atom) { + const long pid = getpid(); + XChangeProperty(context->connection, self->window, context->net_wm_pid_atom, XA_CARDINAL, + 32, PropModeReplace, (const unsigned char*)&pid, 1); + } + XFlush(context->connection); /* TODO: Check for failure? */ |