summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
authorAaron Marcher <info@nulltime.net>2016-09-13 19:34:25 +0200
committerAaron Marcher (drkhsh) <info@nulltime.net>2016-09-13 19:34:25 +0200
commit98e7324010626c5ba05d199190d9416359cf801e (patch)
tree2fe13181961728b8e9e9f16d52dab67e9158780a /slstatus.c
parentba2947ae456c7afa1a6b060d79a37f08d1f6b824 (diff)
set old WM_NAME content before exiting
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/slstatus.c b/slstatus.c
index 7babe1f..991334a 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -592,7 +592,7 @@ main(void)
{
size_t i;
char status_string[4096];
- char *res, *element;
+ char *res, *element, *status_old;
struct arg argument;
struct sigaction act;
@@ -603,6 +603,8 @@ main(void)
dpy = XOpenDisplay(NULL);
+ XFetchName(dpy, DefaultRootWindow(dpy), &status_old);
+
while (!done) {
status_string[0] = '\0';
for (i = 0; i < sizeof(args) / sizeof(args[0]); ++i) {
@@ -630,6 +632,9 @@ main(void)
delay = 0;
}
+ XStoreName(dpy, DefaultRootWindow(dpy), status_old);
+ XSync(dpy, False);
+
XCloseDisplay(dpy);
return 0;