summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard R. Link <brlink@debian.org>2009-01-03 16:22:29 +0100
committerShawn <sabetts@juicebox.(none)>2009-01-16 15:58:20 -0800
commit281aaf7b489d9ba89fdf5e39637cde287e83f9fa (patch)
tree94f66d38efb05594a79f05c21394d2dd40cfad88
parentffae4bf9413bec7efd5d4821e030b63a700fab69 (diff)
downloadratpoison-281aaf7b489d9ba89fdf5e39637cde287e83f9fa.zip
set _net_wm_name for the root window to ratpoison
-rw-r--r--src/globals.c2
-rw-r--r--src/globals.h2
-rw-r--r--src/main.c2
-rw-r--r--src/screen.c6
4 files changed, 12 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c
index 5f21148..9638996 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -52,6 +52,8 @@ Atom _net_wm_pid;
Atom _net_supported;
Atom _net_wm_window_type;
Atom _net_wm_window_type_dialog;
+Atom _net_wm_name;
+Atom utf8_string;
int rp_current_screen;
rp_screen *screens;
diff --git a/src/globals.h b/src/globals.h
index c56bbca..881d3e4 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -119,6 +119,8 @@ extern Atom _net_wm_pid;
extern Atom _net_supported;
extern Atom _net_wm_window_type;
extern Atom _net_wm_window_type_dialog;
+extern Atom _net_wm_name;
+extern Atom utf8_string;
/* mouse properties */
extern int rat_x;
diff --git a/src/main.c b/src/main.c
index 0f213c8..a90ccf2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -691,6 +691,8 @@ main (int argc, char *argv[])
PRINT_DEBUG (("_NET_SUPPORTED = %ld\n", _net_supported));
_net_wm_window_type = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
_net_wm_window_type_dialog = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
+ _net_wm_name = XInternAtom(dpy, "_NET_WM_NAME", False);
+ utf8_string = XInternAtom(dpy, "UTF8_STRING", False);
/* Setup signal handlers. */
XSetErrorHandler(handler);
diff --git a/src/screen.c b/src/screen.c
index d978570..702f10a 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -374,6 +374,10 @@ activate_screen (rp_screen *s)
_net_supported, XA_ATOM, 32, PropModeReplace,
(unsigned char*)&_net_wm_pid, 1);
+ /* set window manager name */
+ XChangeProperty (dpy, RootWindow (dpy, s->screen_num),
+ _net_wm_name, utf8_string, 8, PropModeReplace,
+ (unsigned char*)"ratpoison", 9);
XMapWindow (dpy, s->key_window);
}
@@ -386,6 +390,8 @@ deactivate_screen (rp_screen *s)
/* delete everything so noone sees them while we are not there */
XDeleteProperty (dpy, RootWindow (dpy, s->screen_num),
_net_supported);
+ XDeleteProperty (dpy, RootWindow (dpy, s->screen_num),
+ _net_wm_name);
}
static int