Introduction
Introduction Statistics Contact Development Disclaimer Help
tremoved getnext/getprev, redundant - dwm - [fork] customized build of dwm, the…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 8a5f002c4182abf6dcaac354a3da04cc18830ad9
parent 3ce8c9f33844a995e79329978db9d2cd3981e032
Author: Anselm R. Garbe <[email protected]>
Date: Fri, 16 Feb 2007 10:20:34 +0100
removed getnext/getprev, redundant
Diffstat:
M dwm.h | 2 --
M tag.c | 12 ------------
M view.c | 12 +++++++-----
3 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/dwm.h b/dwm.h
t@@ -128,8 +128,6 @@ extern int xerror(Display *dsply, XErrorEvent *ee); …
/* tag.c */
extern void initrregs(void); /* initialize regexps of r…
-extern Client *getnext(Client *c); /* returns next visible clie…
-extern Client *getprev(Client *c); /* returns previous visible …
extern void settags(Client *c, Client *trans); /* sets tags of c */
extern void tag(Arg *arg); /* tags c with arg's index */
extern void toggletag(Arg *arg); /* toggles c tags with arg's i…
diff --git a/tag.c b/tag.c
t@@ -31,18 +31,6 @@ static unsigned int len = 0;
/* extern */
-Client *
-getnext(Client *c) {
- for(; c && !isvisible(c); c = c->next);
- return c;
-}
-
-Client *
-getprev(Client *c) {
- for(; c && !isvisible(c); c = c->prev);
- return c;
-}
-
void
initrregs(void) {
unsigned int i;
diff --git a/view.c b/view.c
t@@ -8,7 +8,7 @@
static Client *
nexttiled(Client *c) {
- for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
+ for(; c && (c->isfloat || !isvisible(c)); c = c->next);
return c;
}
t@@ -125,8 +125,9 @@ focusnext(Arg *arg) {
if(!sel)
return;
- if(!(c = getnext(sel->next)))
- c = getnext(clients);
+ for(c = sel->next; c && !isvisible(c); c = c->next);
+ if(!c)
+ for(c = clients; c && !isvisible(c); c = c->next);
if(c) {
focus(c);
restack();
t@@ -139,9 +140,10 @@ focusprev(Arg *arg) {
if(!sel)
return;
- if(!(c = getprev(sel->prev))) {
+ for(c = sel->prev; c && !isvisible(c); c = c->prev);
+ if(!c) {
for(c = clients; c && c->next; c = c->next);
- c = getprev(c);
+ for(; c && !isvisible(c); c = c->prev);
}
if(c) {
focus(c);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.