JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
renamed char prop[] into buf[]
[dwm.git] / client.c
index d94c0ed..c03770b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -7,7 +7,7 @@
 
 /* static */
 
-static char prop[128];
+static char buf[128];
 
 static void
 attachstack(Client *c) {
@@ -182,16 +182,16 @@ killclient(const char *arg) {
 }
 
 Bool
-loadprops(Client *c) {
+getprops(Client *c) {
        unsigned int i;
        Bool result = False;
 
-       if(gettextprop(c->win, dwmprops, prop, sizeof prop)) {
-               for(i = 0; i < ntags && i < sizeof prop - 1 && prop[i] != '\0'; i++)
-                       if((c->tags[i] = prop[i] == '1'))
+       if(gettextprop(c->win, dwmprops, buf, sizeof buf)) {
+               for(i = 0; i < ntags && i < sizeof buf - 1 && buf[i] != '\0'; i++)
+                       if((c->tags[i] = buf[i] == '1'))
                                result = True;
-               if(i < sizeof prop - 1 && prop[i] != '\0')
-                       c->isfloating = prop[i] == '1';
+               if(i < sizeof buf - 1 && buf[i] != '\0')
+                       c->isfloating = buf[i] == '1';
        }
        return result;
 }
@@ -242,11 +242,11 @@ manage(Window w, XWindowAttributes *wa) {
        if(t)
                for(i = 0; i < ntags; i++)
                        c->tags[i] = t->tags[i];
-       if(!loadprops(c))
+       if(!getprops(c))
                applyrules(c);
        if(!c->isfloating)
                c->isfloating = (rettrans == Success) || c->isfixed;
-       saveprops(c);
+       setprops(c);
        attach(c);
        attachstack(c);
        XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */
@@ -318,16 +318,16 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
 }
 
 void
-saveprops(Client *c) {
+setprops(Client *c) {
        unsigned int i;
 
-       for(i = 0; i < ntags && i < sizeof prop - 1; i++)
-               prop[i] = c->tags[i] ? '1' : '0';
-       if(i < sizeof prop - 1)
-               prop[i++] = c->isfloating ? '1' : '0';
-       prop[i] = '\0';
+       for(i = 0; i < ntags && i < sizeof buf - 1; i++)
+               buf[i] = c->tags[i] ? '1' : '0';
+       if(i < sizeof buf - 1)
+               buf[i++] = c->isfloating ? '1' : '0';
+       buf[i] = '\0';
        XChangeProperty(dpy, c->win, dwmprops, XA_STRING, 8,
-                       PropModeReplace, (unsigned char *)prop, i);
+                       PropModeReplace, (unsigned char *)buf, i);
 }
 
 void