[client] x11: set _NET_WM_PID

Fixes #1013
This commit is contained in:
Geoffrey McRae 2022-09-18 10:10:13 +10:00
parent 0149549251
commit 5385853f3f
2 changed files with 16 additions and 0 deletions

View File

@ -38,6 +38,7 @@
DEF_ATOM(_NET_WM_WINDOW_TYPE, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE, True) \
DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \
DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \
DEF_ATOM(_NET_WM_PID, True) \
DEF_ATOM(WM_DELETE_WINDOW, True) \ DEF_ATOM(WM_DELETE_WINDOW, True) \
DEF_ATOM(_MOTIF_WM_HINTS, True) \ DEF_ATOM(_MOTIF_WM_HINTS, True) \
\ \

View File

@ -350,6 +350,21 @@ static bool x11Init(const LG_DSInitParams params)
// check for Extended Window Manager Hints support // check for Extended Window Manager Hints support
x11CheckEWMHSupport(); 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 (params.borderless)
{ {
if (x11atoms._MOTIF_WM_HINTS) if (x11atoms._MOTIF_WM_HINTS)