summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-08-28 09:56:59 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-08-28 09:56:59 +0200
commit9d0cc3fb02b9afad8e2ba5565e43fc0906a2ce03 (patch)
tree4866ba0c6702838ef821a15338edc43e7b2064c2
parentfd898918df37440fd1c560b8c45aa46523f856b8 (diff)
parent8f8c58ef3dca96aff80ccad0016c1ef967e947ba (diff)
Merge branch 'Hadron-master'
-rw-r--r--src/winwidget.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index f249694..9495c7f 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -149,9 +149,11 @@ void winwidget_create_window(winwidget ret, int w, int h)
XClassHint *xch;
MWMHints mwmhints;
Atom prop = None;
+ pid_t pid;
int x = 0;
int y = 0;
char *tmpname;
+ char hostname[HOST_NAME_MAX];
D(("winwidget_create_window %dx%d\n", w, h));
@@ -271,6 +273,18 @@ void winwidget_create_window(winwidget ret, int w, int h)
PropModeReplace, (unsigned char *) &prop_fs, 1);
}
+ pid = getpid();
+ prop = XInternAtom(disp, "_NET_WM_PID", False);
+ XChangeProperty(disp, ret->win, prop, XA_CARDINAL, sizeof(pid_t) * 8,
+ PropModeReplace, (const unsigned char *)&pid, 1);
+
+ if (gethostname(hostname, HOST_NAME_MAX) == 0) {
+ hostname[HOST_NAME_MAX-1] = '\0';
+ prop = XInternAtom(disp, "WM_CLIENT_MACHINE", False);
+ XChangeProperty(disp, ret->win, prop, XA_STRING, sizeof(char) * 8,
+ PropModeReplace, (unsigned char *)hostname, strlen(hostname));
+ }
+
XSetWMProtocols(disp, ret->win, &wmDeleteWindow, 1);
winwidget_update_title(ret);
xch = XAllocClassHint();