diff --git a/client/displayservers/X11/atoms.h b/client/displayservers/X11/atoms.h index c1446bf9..1126e249 100644 --- a/client/displayservers/X11/atoms.h +++ b/client/displayservers/X11/atoms.h @@ -38,6 +38,7 @@ DEF_ATOM(_NET_WM_WINDOW_TYPE, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \ + DEF_ATOM(_NET_WM_PID, True) \ DEF_ATOM(WM_DELETE_WINDOW, True) \ DEF_ATOM(_MOTIF_WM_HINTS, True) \ \ diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 40f92c02..f36db977 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -350,6 +350,21 @@ static bool x11Init(const LG_DSInitParams params) // check for Extended Window Manager Hints support x11CheckEWMHSupport(); + if (x11atoms._NET_WM_PID) + { + pid_t pid = getpid(); + XChangeProperty( + x11.display, + x11.window, + x11atoms._NET_WM_PID, + XA_CARDINAL, + 32, + PropModeReplace, + (unsigned char *)&pid, + 1 + ); + } + if (params.borderless) { if (x11atoms._MOTIF_WM_HINTS)