diff options
author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-12 15:17:22 +0200 |
---|---|---|
committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-12 15:17:22 +0200 |
commit | dfd84f9bf3b9d949412a73bc62a43109b340d395 (patch) | |
tree | ebeac582951e2ef574f50018298c4bc928849d64 /cmd.c | |
parent | 7696c89c90c926f6371b1ee3ec1b13dd2414aa40 (diff) | |
download | dwm-dfd84f9bf3b9d949412a73bc62a43109b340d395.tar dwm-dfd84f9bf3b9d949412a73bc62a43109b340d395.tar.gz dwm-dfd84f9bf3b9d949412a73bc62a43109b340d395.tar.bz2 |
simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -23,16 +23,18 @@ void sel(void *aux) { const char *arg = aux; - Client *c; + Client *c = NULL; if(!arg || !stack) return; if(!strncmp(arg, "next", 5)) - focus(stack->snext ? stack->snext : stack); - else if(!strncmp(arg, "prev", 5)) { + c = stack->snext ? stack->snext : stack; + else if(!strncmp(arg, "prev", 5)) for(c = stack; c && c->snext; c = c->snext); - focus(c ? c : stack); - } + if(!c) + c = stack; + raise(c); + focus(c); } void |