diff options
| author | Anselm R. Garbe <garbeam@gmail.com> | 2007-08-22 19:01:05 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-08-22 19:01:05 +0200 |
| commit | 36672d0401299a5230b516ca4575365d9f45dd35 (patch) | |
| tree | 3770848e8bec981cdc239d0e89b2a241f2bdfc67 | |
| parent | renamed char prop[] into buf[] (diff) | |
| download | dwm-36672d0401299a5230b516ca4575365d9f45dd35.tar.gz dwm-36672d0401299a5230b516ca4575365d9f45dd35.zip | |
removed the _DWM_PROPERTIES handling, reverted ban/unban to XMoveWindow(), and changed argument of setlayout to layout[N].symbol check
| -rw-r--r-- | client.c | 50 | ||||
| -rw-r--r-- | config.mk | 4 | ||||
| -rw-r--r-- | dwm.h | 8 | ||||
| -rw-r--r-- | event.c | 8 | ||||
| -rw-r--r-- | main.c | 6 | ||||
| -rw-r--r-- | screen.c | 48 |
6 files changed, 23 insertions, 101 deletions
| @@ -1,14 +1,11 @@ | |||
| 1 | /* See LICENSE file for copyright and license details. */ | 1 | /* See LICENSE file for copyright and license details. */ |
| 2 | #include "dwm.h" | 2 | #include "dwm.h" |
| 3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 4 | #include <string.h> | ||
| 5 | #include <X11/Xatom.h> | 4 | #include <X11/Xatom.h> |
| 6 | #include <X11/Xutil.h> | 5 | #include <X11/Xutil.h> |
| 7 | 6 | ||
| 8 | /* static */ | 7 | /* static */ |
| 9 | 8 | ||
| 10 | static char buf[128]; | ||
| 11 | |||
| 12 | static void | 9 | static void |
| 13 | attachstack(Client *c) { | 10 | attachstack(Client *c) { |
| 14 | c->snext = stack; | 11 | c->snext = stack; |
| @@ -102,10 +99,8 @@ void | |||
| 102 | ban(Client *c) { | 99 | ban(Client *c) { |
| 103 | if(c->isbanned) | 100 | if(c->isbanned) |
| 104 | return; | 101 | return; |
| 105 | XUnmapWindow(dpy, c->win); | 102 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
| 106 | setclientstate(c, IconicState); | ||
| 107 | c->isbanned = True; | 103 | c->isbanned = True; |
| 108 | c->unmapped++; | ||
| 109 | } | 104 | } |
| 110 | 105 | ||
| 111 | void | 106 | void |
| @@ -181,21 +176,6 @@ killclient(const char *arg) { | |||
| 181 | XKillClient(dpy, sel->win); | 176 | XKillClient(dpy, sel->win); |
| 182 | } | 177 | } |
| 183 | 178 | ||
| 184 | Bool | ||
| 185 | getprops(Client *c) { | ||
| 186 | unsigned int i; | ||
| 187 | Bool result = False; | ||
| 188 | |||
| 189 | if(gettextprop(c->win, dwmprops, buf, sizeof buf)) { | ||
| 190 | for(i = 0; i < ntags && i < sizeof buf - 1 && buf[i] != '\0'; i++) | ||
| 191 | if((c->tags[i] = buf[i] == '1')) | ||
| 192 | result = True; | ||
| 193 | if(i < sizeof buf - 1 && buf[i] != '\0') | ||
| 194 | c->isfloating = buf[i] == '1'; | ||
| 195 | } | ||
| 196 | return result; | ||
| 197 | } | ||
| 198 | |||
| 199 | void | 179 | void |
| 200 | manage(Window w, XWindowAttributes *wa) { | 180 | manage(Window w, XWindowAttributes *wa) { |
| 201 | unsigned int i; | 181 | unsigned int i; |
| @@ -242,15 +222,14 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 242 | if(t) | 222 | if(t) |
| 243 | for(i = 0; i < ntags; i++) | 223 | for(i = 0; i < ntags; i++) |
| 244 | c->tags[i] = t->tags[i]; | 224 | c->tags[i] = t->tags[i]; |
| 245 | if(!getprops(c)) | 225 | applyrules(c); |
| 246 | applyrules(c); | ||
| 247 | if(!c->isfloating) | 226 | if(!c->isfloating) |
| 248 | c->isfloating = (rettrans == Success) || c->isfixed; | 227 | c->isfloating = (rettrans == Success) || c->isfixed; |
| 249 | setprops(c); | ||
| 250 | attach(c); | 228 | attach(c); |
| 251 | attachstack(c); | 229 | attachstack(c); |
| 252 | XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */ | 230 | XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */ |
| 253 | ban(c); | 231 | ban(c); |
| 232 | XMapWindow(dpy, c->win); | ||
| 254 | arrange(); | 233 | arrange(); |
| 255 | } | 234 | } |
| 256 | 235 | ||
| @@ -318,29 +297,15 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | |||
| 318 | } | 297 | } |
| 319 | 298 | ||
| 320 | void | 299 | void |
| 321 | setprops(Client *c) { | ||
| 322 | unsigned int i; | ||
| 323 | |||
| 324 | for(i = 0; i < ntags && i < sizeof buf - 1; i++) | ||
| 325 | buf[i] = c->tags[i] ? '1' : '0'; | ||
| 326 | if(i < sizeof buf - 1) | ||
| 327 | buf[i++] = c->isfloating ? '1' : '0'; | ||
| 328 | buf[i] = '\0'; | ||
| 329 | XChangeProperty(dpy, c->win, dwmprops, XA_STRING, 8, | ||
| 330 | PropModeReplace, (unsigned char *)buf, i); | ||
| 331 | } | ||
| 332 | |||
| 333 | void | ||
| 334 | unban(Client *c) { | 300 | unban(Client *c) { |
| 335 | if(!c->isbanned) | 301 | if(!c->isbanned) |
| 336 | return; | 302 | return; |
| 337 | XMapWindow(dpy, c->win); | 303 | XMoveWindow(dpy, c->win, c->x, c->y); |
| 338 | setclientstate(c, NormalState); | ||
| 339 | c->isbanned = False; | 304 | c->isbanned = False; |
| 340 | } | 305 | } |
| 341 | 306 | ||
| 342 | void | 307 | void |
| 343 | unmanage(Client *c, long state) { | 308 | unmanage(Client *c) { |
| 344 | XWindowChanges wc; | 309 | XWindowChanges wc; |
| 345 | 310 | ||
| 346 | wc.border_width = c->oldborder; | 311 | wc.border_width = c->oldborder; |
| @@ -353,14 +318,13 @@ unmanage(Client *c, long state) { | |||
| 353 | if(sel == c) | 318 | if(sel == c) |
| 354 | focus(NULL); | 319 | focus(NULL); |
| 355 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); | 320 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); |
| 356 | setclientstate(c, state); | 321 | setclientstate(c, WithdrawnState); |
| 357 | free(c->tags); | 322 | free(c->tags); |
| 358 | free(c); | 323 | free(c); |
| 359 | XSync(dpy, False); | 324 | XSync(dpy, False); |
| 360 | XSetErrorHandler(xerror); | 325 | XSetErrorHandler(xerror); |
| 361 | XUngrabServer(dpy); | 326 | XUngrabServer(dpy); |
| 362 | if(state != NormalState) | 327 | arrange(); |
| 363 | arrange(); | ||
| 364 | } | 328 | } |
| 365 | 329 | ||
| 366 | void | 330 | void |
| @@ -20,8 +20,8 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 | |||
| 20 | # flags | 20 | # flags |
| 21 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" | 21 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" |
| 22 | LDFLAGS = -s ${LIBS} | 22 | LDFLAGS = -s ${LIBS} |
| 23 | #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" | 23 | CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" |
| 24 | #LDFLAGS = -g ${LIBS} | 24 | LDFLAGS = -g ${LIBS} |
| 25 | 25 | ||
| 26 | # Solaris | 26 | # Solaris |
| 27 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" | 27 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" |
| @@ -48,7 +48,6 @@ struct Client { | |||
| 48 | int rx, ry, rw, rh; /* revert geometry */ | 48 | int rx, ry, rw, rh; /* revert geometry */ |
| 49 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; | 49 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
| 50 | int minax, maxax, minay, maxay; | 50 | int minax, maxax, minay, maxay; |
| 51 | int unmapped; | ||
| 52 | long flags; | 51 | long flags; |
| 53 | unsigned int border, oldborder; | 52 | unsigned int border, oldborder; |
| 54 | Bool isbanned, isfixed, ismax, isfloating; | 53 | Bool isbanned, isfixed, ismax, isfloating; |
| @@ -81,7 +80,7 @@ extern int wax, way, wah, waw; /* windowarea geometry */ | |||
| 81 | extern unsigned int bh, blw, bpos; /* bar height, bar layout label width, bar position */ | 80 | extern unsigned int bh, blw, bpos; /* bar height, bar layout label width, bar position */ |
| 82 | extern unsigned int ntags, numlockmask; /* number of tags, numlock mask */ | 81 | extern unsigned int ntags, numlockmask; /* number of tags, numlock mask */ |
| 83 | extern void (*handler[LASTEvent])(XEvent *); /* event handler */ | 82 | extern void (*handler[LASTEvent])(XEvent *); /* event handler */ |
| 84 | extern Atom dwmprops, wmatom[WMLast], netatom[NetLast]; | 83 | extern Atom wmatom[WMLast], netatom[NetLast]; |
| 85 | extern Bool selscreen, *seltags; /* seltags is array of Bool */ | 84 | extern Bool selscreen, *seltags; /* seltags is array of Bool */ |
| 86 | extern Client *clients, *sel, *stack; /* global client list and stack */ | 85 | extern Client *clients, *sel, *stack; /* global client list and stack */ |
| 87 | extern Cursor cursor[CurLast]; | 86 | extern Cursor cursor[CurLast]; |
| @@ -96,13 +95,11 @@ void configure(Client *c); /* send synthetic configure event */ | |||
| 96 | void detach(Client *c); /* detaches c from global client list */ | 95 | void detach(Client *c); /* detaches c from global client list */ |
| 97 | void focus(Client *c); /* focus c if visible && !NULL, or focus top visible */ | 96 | void focus(Client *c); /* focus c if visible && !NULL, or focus top visible */ |
| 98 | void killclient(const char *arg); /* kill sel nicely */ | 97 | void killclient(const char *arg); /* kill sel nicely */ |
| 99 | Bool getprops(Client *c); /* gets client properties */ | ||
| 100 | void manage(Window w, XWindowAttributes *wa); /* manage new client */ | 98 | void manage(Window w, XWindowAttributes *wa); /* manage new client */ |
| 101 | void resize(Client *c, int x, int y, | 99 | void resize(Client *c, int x, int y, |
| 102 | int w, int h, Bool sizehints); /* resize with given coordinates c*/ | 100 | int w, int h, Bool sizehints); /* resize with given coordinates c*/ |
| 103 | void setprops(Client *c); /* sets client properties */ | ||
| 104 | void unban(Client *c); /* unbans c */ | 101 | void unban(Client *c); /* unbans c */ |
| 105 | void unmanage(Client *c, long state); /* unmanage c */ | 102 | void unmanage(Client *c); /* unmanage c */ |
| 106 | void updatesizehints(Client *c); /* update the size hint variables of c */ | 103 | void updatesizehints(Client *c); /* update the size hint variables of c */ |
| 107 | void updatetitle(Client *c); /* update the name of c */ | 104 | void updatetitle(Client *c); /* update the name of c */ |
| 108 | 105 | ||
| @@ -131,7 +128,6 @@ void initlayouts(void); /* initialize layout array */ | |||
| 131 | Bool isarrange(void (*func)()); /* returns True if func is the layout function in use */ | 128 | Bool isarrange(void (*func)()); /* returns True if func is the layout function in use */ |
| 132 | Bool isfloating(void); /* returns True if floating layout is enabled */ | 129 | Bool isfloating(void); /* returns True if floating layout is enabled */ |
| 133 | Bool isvisible(Client *c); /* returns True if client is visible */ | 130 | Bool isvisible(Client *c); /* returns True if client is visible */ |
| 134 | void getdwmprops(void); /* gets dwm properties */ | ||
| 135 | Client *nexttiled(Client *c); /* returns tiled successor of c */ | 131 | Client *nexttiled(Client *c); /* returns tiled successor of c */ |
| 136 | void restack(void); /* restores z layers of all clients */ | 132 | void restack(void); /* restores z layers of all clients */ |
| 137 | void setlayout(const char *arg); /* sets layout, NULL means next layout */ | 133 | void setlayout(const char *arg); /* sets layout, NULL means next layout */ |
| @@ -221,7 +221,7 @@ destroynotify(XEvent *e) { | |||
| 221 | XDestroyWindowEvent *ev = &e->xdestroywindow; | 221 | XDestroyWindowEvent *ev = &e->xdestroywindow; |
| 222 | 222 | ||
| 223 | if((c = getclient(ev->window))) | 223 | if((c = getclient(ev->window))) |
| 224 | unmanage(c, WithdrawnState); | 224 | unmanage(c); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static void | 227 | static void |
| @@ -332,10 +332,8 @@ unmapnotify(XEvent *e) { | |||
| 332 | Client *c; | 332 | Client *c; |
| 333 | XUnmapEvent *ev = &e->xunmap; | 333 | XUnmapEvent *ev = &e->xunmap; |
| 334 | 334 | ||
| 335 | if((c = getclient(ev->window)) && (ev->event == root)) { | 335 | if((c = getclient(ev->window))) |
| 336 | if(ev->send_event || c->unmapped-- == 0) | 336 | unmanage(c); |
| 337 | unmanage(c, WithdrawnState); | ||
| 338 | } | ||
| 339 | } | 337 | } |
| 340 | 338 | ||
| 341 | /* extern */ | 339 | /* extern */ |
| @@ -20,7 +20,7 @@ int screen, sx, sy, sw, sh, wax, way, waw, wah; | |||
| 20 | unsigned int bh, ntags; | 20 | unsigned int bh, ntags; |
| 21 | unsigned int bpos = BARPOS; | 21 | unsigned int bpos = BARPOS; |
| 22 | unsigned int numlockmask = 0; | 22 | unsigned int numlockmask = 0; |
| 23 | Atom dwmprops, wmatom[WMLast], netatom[NetLast]; | 23 | Atom wmatom[WMLast], netatom[NetLast]; |
| 24 | Bool *seltags; | 24 | Bool *seltags; |
| 25 | Bool selscreen = True; | 25 | Bool selscreen = True; |
| 26 | Client *clients = NULL; | 26 | Client *clients = NULL; |
| @@ -42,7 +42,7 @@ cleanup(void) { | |||
| 42 | close(STDIN_FILENO); | 42 | close(STDIN_FILENO); |
| 43 | while(stack) { | 43 | while(stack) { |
| 44 | unban(stack); | 44 | unban(stack); |
| 45 | unmanage(stack, NormalState); | 45 | unmanage(stack); |
| 46 | } | 46 | } |
| 47 | if(dc.font.set) | 47 | if(dc.font.set) |
| 48 | XFreeFontSet(dpy, dc.font.set); | 48 | XFreeFontSet(dpy, dc.font.set); |
| @@ -165,7 +165,6 @@ setup(void) { | |||
| 165 | XSetWindowAttributes wa; | 165 | XSetWindowAttributes wa; |
| 166 | 166 | ||
| 167 | /* init atoms */ | 167 | /* init atoms */ |
| 168 | dwmprops = XInternAtom(dpy, "_DWM_PROPERTIES", False); | ||
| 169 | wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); | 168 | wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); |
| 170 | wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); | 169 | wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); |
| 171 | wmatom[WMName] = XInternAtom(dpy, "WM_NAME", False); | 170 | wmatom[WMName] = XInternAtom(dpy, "WM_NAME", False); |
| @@ -231,7 +230,6 @@ setup(void) { | |||
| 231 | XSetFont(dpy, dc.gc, dc.font.xfont->fid); | 230 | XSetFont(dpy, dc.gc, dc.font.xfont->fid); |
| 232 | /* multihead support */ | 231 | /* multihead support */ |
| 233 | selscreen = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); | 232 | selscreen = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); |
| 234 | getdwmprops(); | ||
| 235 | } | 233 | } |
| 236 | 234 | ||
| 237 | /* | 235 | /* |
| @@ -3,8 +3,6 @@ | |||
| 3 | #include <regex.h> | 3 | #include <regex.h> |
| 4 | #include <stdio.h> | 4 | #include <stdio.h> |
| 5 | #include <stdlib.h> | 5 | #include <stdlib.h> |
| 6 | #include <string.h> | ||
| 7 | #include <X11/Xatom.h> | ||
| 8 | #include <X11/Xutil.h> | 6 | #include <X11/Xutil.h> |
| 9 | 7 | ||
| 10 | /* static */ | 8 | /* static */ |
| @@ -28,7 +26,6 @@ typedef struct { | |||
| 28 | TAGS | 26 | TAGS |
| 29 | RULES | 27 | RULES |
| 30 | 28 | ||
| 31 | static char buf[512]; | ||
| 32 | static unsigned int nrules = 0; | 29 | static unsigned int nrules = 0; |
| 33 | static unsigned int nlayouts = 0; | 30 | static unsigned int nlayouts = 0; |
| 34 | static unsigned int ltidx = 0; /* default */ | 31 | static unsigned int ltidx = 0; /* default */ |
| @@ -53,19 +50,6 @@ floating(void) { /* default floating layout */ | |||
| 53 | resize(c, c->x, c->y, c->w, c->h, True); | 50 | resize(c, c->x, c->y, c->w, c->h, True); |
| 54 | } | 51 | } |
| 55 | 52 | ||
| 56 | static void | ||
| 57 | setdwmprops(void) { | ||
| 58 | unsigned int i; | ||
| 59 | |||
| 60 | for(i = 0; i < ntags && i < sizeof buf - 1; i++) | ||
| 61 | buf[i] = seltags[i] ? '1' : '0'; | ||
| 62 | if(i < sizeof buf - 1) | ||
| 63 | buf[i++] = (char)ltidx + '0'; | ||
| 64 | buf[i] = '\0'; | ||
| 65 | XChangeProperty(dpy, root, dwmprops, XA_STRING, 8, | ||
| 66 | PropModeReplace, (unsigned char *)buf, i); | ||
| 67 | } | ||
| 68 | |||
| 69 | LAYOUTS | 53 | LAYOUTS |
| 70 | 54 | ||
| 71 | /* extern */ | 55 | /* extern */ |
| @@ -74,6 +58,7 @@ unsigned int blw = 0; | |||
| 74 | 58 | ||
| 75 | void | 59 | void |
| 76 | applyrules(Client *c) { | 60 | applyrules(Client *c) { |
| 61 | static char buf[512]; | ||
| 77 | unsigned int i, j; | 62 | unsigned int i, j; |
| 78 | regmatch_t tmp; | 63 | regmatch_t tmp; |
| 79 | Bool matched = False; | 64 | Bool matched = False; |
| @@ -215,20 +200,6 @@ isvisible(Client *c) { | |||
| 215 | return False; | 200 | return False; |
| 216 | } | 201 | } |
| 217 | 202 | ||
| 218 | void | ||
| 219 | getdwmprops(void) { | ||
| 220 | unsigned int i; | ||
| 221 | |||
| 222 | if(gettextprop(root, dwmprops, buf, sizeof buf)) { | ||
| 223 | for(i = 0; i < ntags && i < sizeof buf - 1 && buf[i] != '\0'; i++) | ||
| 224 | seltags[i] = buf[i] == '1'; | ||
| 225 | if(i < sizeof buf - 1 && buf[i] != '\0') { | ||
| 226 | if((unsigned int)(buf[i] - '0') < nlayouts) | ||
| 227 | ltidx = buf[i] - '0'; | ||
| 228 | } | ||
| 229 | } | ||
| 230 | } | ||
| 231 | |||
| 232 | Client * | 203 | Client * |
| 233 | nexttiled(Client *c) { | 204 | nexttiled(Client *c) { |
| 234 | for(; c && (c->isfloating || !isvisible(c)); c = c->next); | 205 | for(; c && (c->isfloating || !isvisible(c)); c = c->next); |
| @@ -266,15 +237,17 @@ restack(void) { | |||
| 266 | 237 | ||
| 267 | void | 238 | void |
| 268 | setlayout(const char *arg) { | 239 | setlayout(const char *arg) { |
| 269 | int i; | 240 | unsigned int i; |
| 270 | 241 | ||
| 271 | if(!arg) { | 242 | if(!arg) { |
| 272 | if(++ltidx == nlayouts) | 243 | if(++ltidx == nlayouts) |
| 273 | ltidx = 0;; | 244 | ltidx = 0;; |
| 274 | } | 245 | } |
| 275 | else { | 246 | else { |
| 276 | i = atoi(arg); | 247 | for(i = 0; i < nlayouts; i++) |
| 277 | if(i < 0 || i >= nlayouts) | 248 | if(arg == layouts[i].symbol) |
| 249 | break; | ||
| 250 | if(i == nlayouts) | ||
| 278 | return; | 251 | return; |
| 279 | ltidx = i; | 252 | ltidx = i; |
| 280 | } | 253 | } |
| @@ -282,7 +255,6 @@ setlayout(const char *arg) { | |||
| 282 | arrange(); | 255 | arrange(); |
| 283 | else | 256 | else |
| 284 | drawstatus(); | 257 | drawstatus(); |
| 285 | setdwmprops(); | ||
| 286 | } | 258 | } |
| 287 | 259 | ||
| 288 | void | 260 | void |
| @@ -296,7 +268,6 @@ tag(const char *arg) { | |||
| 296 | i = idxoftag(arg); | 268 | i = idxoftag(arg); |
| 297 | if(i >= 0 && i < ntags) | 269 | if(i >= 0 && i < ntags) |
| 298 | sel->tags[i] = True; | 270 | sel->tags[i] = True; |
| 299 | setprops(sel); | ||
| 300 | arrange(); | 271 | arrange(); |
| 301 | } | 272 | } |
| 302 | 273 | ||
| @@ -315,10 +286,8 @@ togglefloating(const char *arg) { | |||
| 315 | if(!sel || isfloating()) | 286 | if(!sel || isfloating()) |
| 316 | return; | 287 | return; |
| 317 | sel->isfloating = !sel->isfloating; | 288 | sel->isfloating = !sel->isfloating; |
| 318 | if(sel->isfloating) { | 289 | if(sel->isfloating) |
| 319 | resize(sel, sel->x, sel->y, sel->w, sel->h, True); | 290 | resize(sel, sel->x, sel->y, sel->w, sel->h, True); |
| 320 | setprops(sel); | ||
| 321 | } | ||
| 322 | arrange(); | 291 | arrange(); |
| 323 | } | 292 | } |
| 324 | 293 | ||
| @@ -352,7 +321,6 @@ toggletag(const char *arg) { | |||
| 352 | for(j = 0; j < ntags && !sel->tags[j]; j++); | 321 | for(j = 0; j < ntags && !sel->tags[j]; j++); |
| 353 | if(j == ntags) | 322 | if(j == ntags) |
| 354 | sel->tags[i] = True; | 323 | sel->tags[i] = True; |
| 355 | setprops(sel); | ||
| 356 | arrange(); | 324 | arrange(); |
| 357 | } | 325 | } |
| 358 | 326 | ||
| @@ -365,7 +333,6 @@ toggleview(const char *arg) { | |||
| 365 | for(j = 0; j < ntags && !seltags[j]; j++); | 333 | for(j = 0; j < ntags && !seltags[j]; j++); |
| 366 | if(j == ntags) | 334 | if(j == ntags) |
| 367 | seltags[i] = True; /* cannot toggle last view */ | 335 | seltags[i] = True; /* cannot toggle last view */ |
| 368 | setdwmprops(); | ||
| 369 | arrange(); | 336 | arrange(); |
| 370 | } | 337 | } |
| 371 | 338 | ||
| @@ -404,6 +371,5 @@ view(const char *arg) { | |||
| 404 | i = idxoftag(arg); | 371 | i = idxoftag(arg); |
| 405 | if(i >= 0 && i < ntags) | 372 | if(i >= 0 && i < ntags) |
| 406 | seltags[i] = True; | 373 | seltags[i] = True; |
| 407 | setdwmprops(); | ||
| 408 | arrange(); | 374 | arrange(); |
| 409 | } | 375 | } |
