diff options
Diffstat (limited to '')
| -rw-r--r-- | dwm.h | 2 | ||||
| -rw-r--r-- | tag.c | 12 | ||||
| -rw-r--r-- | view.c | 12 |
3 files changed, 7 insertions, 19 deletions
| @@ -128,8 +128,6 @@ extern int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ | |||
| 128 | 128 | ||
| 129 | /* tag.c */ | 129 | /* tag.c */ |
| 130 | extern void initrregs(void); /* initialize regexps of rules defined in config.h */ | 130 | extern void initrregs(void); /* initialize regexps of rules defined in config.h */ |
| 131 | extern Client *getnext(Client *c); /* returns next visible client */ | ||
| 132 | extern Client *getprev(Client *c); /* returns previous visible client */ | ||
| 133 | extern void settags(Client *c, Client *trans); /* sets tags of c */ | 131 | extern void settags(Client *c, Client *trans); /* sets tags of c */ |
| 134 | extern void tag(Arg *arg); /* tags c with arg's index */ | 132 | extern void tag(Arg *arg); /* tags c with arg's index */ |
| 135 | extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ | 133 | extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ |
| @@ -31,18 +31,6 @@ static unsigned int len = 0; | |||
| 31 | 31 | ||
| 32 | /* extern */ | 32 | /* extern */ |
| 33 | 33 | ||
| 34 | Client * | ||
| 35 | getnext(Client *c) { | ||
| 36 | for(; c && !isvisible(c); c = c->next); | ||
| 37 | return c; | ||
| 38 | } | ||
| 39 | |||
| 40 | Client * | ||
| 41 | getprev(Client *c) { | ||
| 42 | for(; c && !isvisible(c); c = c->prev); | ||
| 43 | return c; | ||
| 44 | } | ||
| 45 | |||
| 46 | void | 34 | void |
| 47 | initrregs(void) { | 35 | initrregs(void) { |
| 48 | unsigned int i; | 36 | unsigned int i; |
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | static Client * | 9 | static Client * |
| 10 | nexttiled(Client *c) { | 10 | nexttiled(Client *c) { |
| 11 | for(c = getnext(c); c && c->isfloat; c = getnext(c->next)); | 11 | for(; c && (c->isfloat || !isvisible(c)); c = c->next); |
| 12 | return c; | 12 | return c; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| @@ -125,8 +125,9 @@ focusnext(Arg *arg) { | |||
| 125 | 125 | ||
| 126 | if(!sel) | 126 | if(!sel) |
| 127 | return; | 127 | return; |
| 128 | if(!(c = getnext(sel->next))) | 128 | for(c = sel->next; c && !isvisible(c); c = c->next); |
| 129 | c = getnext(clients); | 129 | if(!c) |
| 130 | for(c = clients; c && !isvisible(c); c = c->next); | ||
| 130 | if(c) { | 131 | if(c) { |
| 131 | focus(c); | 132 | focus(c); |
| 132 | restack(); | 133 | restack(); |
| @@ -139,9 +140,10 @@ focusprev(Arg *arg) { | |||
| 139 | 140 | ||
| 140 | if(!sel) | 141 | if(!sel) |
| 141 | return; | 142 | return; |
| 142 | if(!(c = getprev(sel->prev))) { | 143 | for(c = sel->prev; c && !isvisible(c); c = c->prev); |
| 144 | if(!c) { | ||
| 143 | for(c = clients; c && c->next; c = c->next); | 145 | for(c = clients; c && c->next; c = c->next); |
| 144 | c = getprev(c); | 146 | for(; c && !isvisible(c); c = c->prev); |
| 145 | } | 147 | } |
| 146 | if(c) { | 148 | if(c) { |
| 147 | focus(c); | 149 | focus(c); |
