summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-20 15:08:05 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-20 15:08:05 +0100
commit5fcac5aad79988fd242f475ef278278167a7cd33 (patch)
tree3a8f5a234b73f07090a636ead0a7d1b6a90fa300
parentac3fe41b9b77964a56da652c3930f5e52dc40668 (diff)
downloadwmname-5fcac5aad79988fd242f475ef278278167a7cd33.tar.gz
wmname-5fcac5aad79988fd242f475ef278278167a7cd33.zip
simplifications
-rw-r--r--setwmname.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/setwmname.c b/setwmname.c
index 7694bc6..66747ae 100644
--- a/setwmname.c
+++ b/setwmname.c
@@ -21,7 +21,7 @@ int
main(int argc, char **argv) {
Display *dpy;
Window root, dummy;
- Atom net_supporting_wm_check, net_wm_name, utf8_string;
+ Atom netwmcheck, netwmname, utf8_string;
if(argc == 2) {
if(!strncmp(argv[1], "-v", 3))
@@ -31,13 +31,13 @@ main(int argc, char **argv) {
eprint("usage: setwmname <name> [-v]\n");
if(!(dpy = XOpenDisplay(0)))
- eprint("dmenu: cannot open display\n");
+ eprint("setwmname: cannot open display\n");
root = DefaultRootWindow(dpy);
- net_supporting_wm_check = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
- net_wm_name = XInternAtom(dpy, "_NET_WM_NAME", False);
+ netwmcheck = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
+ netwmname = XInternAtom(dpy, "_NET_WM_NAME", False);
utf8_string = XInternAtom(dpy, "UTF8_STRING", False);
- XChangeProperty(dpy, root, net_supporting_wm_check, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&root, 1);
- XChangeProperty(dpy, root, net_wm_name, utf8_string, 8, PropModeReplace, (unsigned char *)argv[1], strlen(argv[1]));
+ XChangeProperty(dpy, root, netwmcheck, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&root, 1);
+ XChangeProperty(dpy, root, netwmname, utf8_string, 8, PropModeReplace, (unsigned char *)argv[1], strlen(argv[1]));
XSync(dpy, False);
XCloseDisplay(dpy);
return 0;