about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/dwm.c b/dwm.c
index d9e1c7f..3dc6f84 100644
--- a/dwm.c
+++ b/dwm.c
@@ -145,7 +145,7 @@ void initfont(const char *fontstr);
 Bool isoccupied(unsigned int t);
 Bool isprotodel(Client *c);
 Bool isurgent(unsigned int t);
-Bool isvisible(Client *c, Bool *cmp);
+Bool isvisible(Client *c);
 void keypress(XEvent *e);
 void killclient(const char *arg);
 void manage(Window w, XWindowAttributes *wa);
@@ -261,7 +261,7 @@ arrange(void) {
 	Client *c;
 
 	for(c = clients; c; c = c->next)
-		if(isvisible(c, NULL)) {
+		if(isvisible(c)) {
 			unban(c);
 			if(!lt->arrange || c->isfloating)
 				resize(c, c->x, c->y, c->w, c->h, True);
@@ -441,7 +441,7 @@ configurerequest(XEvent *e) {
 			if((ev->value_mask & (CWX|CWY))
 			&& !(ev->value_mask & (CWWidth|CWHeight)))
 				configure(c);
-			if(isvisible(c, NULL))
+			if(isvisible(c))
 				XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
 		}
 		else
@@ -494,7 +494,7 @@ drawbar(void) {
 	Client *c;
 
 	dc.x = 0;
-	for(c = stack; c && !isvisible(c, NULL); c = c->snext);
+	for(c = stack; c && !isvisible(c); c = c->snext);
 	for(i = 0; i < LENGTH(tags); i++) {
 		dc.w = textw(tags[i]);
 		if(tagset[seltags][i]) {
@@ -634,8 +634,8 @@ expose(XEvent *e) {
 
 void
 focus(Client *c) {
-	if(!c || (c && !isvisible(c, NULL)))
-		for(c = stack; c && !isvisible(c, NULL); c = c->snext);
+	if(!c || (c && !isvisible(c)))
+		for(c = stack; c && !isvisible(c); c = c->snext);
 	if(sel && sel != c) {
 		grabbuttons(sel, False);
 		XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
@@ -669,9 +669,9 @@ focusnext(const char *arg) {
 
 	if(!sel)
 		return;
-	for(c = sel->next; c && !isvisible(c, arg ? sel->tags : NULL); c = c->next);
+	for(c = sel->next; c && !isvisible(c); c = c->next);
 	if(!c)
-		for(c = clients; c && !isvisible(c, arg ? sel->tags : NULL); c = c->next);
+		for(c = clients; c && !isvisible(c); c = c->next);
 	if(c) {
 		focus(c);
 		restack();
@@ -684,10 +684,10 @@ focusprev(const char *arg) {
 
 	if(!sel)
 		return;
-	for(c = sel->prev; c && !isvisible(c, arg ? sel->tags : NULL); c = c->prev);
+	for(c = sel->prev; c && !isvisible(c); c = c->prev);
 	if(!c) {
 		for(c = clients; c && c->next; c = c->next);
-		for(; c && !isvisible(c, arg ? sel->tags : NULL); c = c->prev);
+		for(; c && !isvisible(c); c = c->prev);
 	}
 	if(c) {
 		focus(c);
@@ -888,13 +888,11 @@ isurgent(unsigned int t) {
 }
 
 Bool
-isvisible(Client *c, Bool *cmp) {
+isvisible(Client *c) {
 	unsigned int i;
 
-	if(!cmp)
-		cmp = tagset[seltags];
 	for(i = 0; i < LENGTH(tags); i++)
-		if(c->tags[i] && cmp[i])
+		if(c->tags[i] && tagset[seltags][i])
 			return True;
 	return False;
 }
@@ -1019,7 +1017,7 @@ monocle(void) {
 	Client *c;
 
 	for(c = clients; c; c = c->next)
-		if(!c->isfloating && isvisible(c, NULL))
+		if(!c->isfloating && isvisible(c))
 			resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, RESIZEHINTS);
 }
 
@@ -1070,7 +1068,7 @@ movemouse(Client *c) {
 
 Client *
 nextunfloating(Client *c) {
-	for(; c && (c->isfloating || !isvisible(c, NULL)); c = c->next);
+	for(; c && (c->isfloating || !isvisible(c)); c = c->next);
 	return c;
 }
 
@@ -1230,7 +1228,7 @@ restack(void) {
 		wc.stack_mode = Below;
 		wc.sibling = barwin;
 		for(c = stack; c; c = c->snext)
-			if(!c->isfloating && isvisible(c, NULL)) {
+			if(!c->isfloating && isvisible(c)) {
 				XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
 				wc.sibling = c->win;
 			}
rce files' href='/akkartik/mu/commit/html/002test.cc.html?h=hlt&id=672e3e50c6ed6de161e40aa256c3fc0f2b1f7cf9'>672e3e50 ^
9a81d746 ^
672e3e50 ^
c02478c4 ^




672e3e50 ^

4690ce81 ^
44c1aeef ^

4690ce81 ^
c02478c4 ^
672e3e50 ^

44c1aeef ^
4690ce81 ^


672e3e50 ^
44c1aeef ^
672e3e50 ^
44c1aeef ^
65361948 ^
672e3e50 ^




44c1aeef ^
65361948 ^
672e3e50 ^








4690ce81 ^
672e3e50 ^



4690ce81 ^
672e3e50 ^



d059fe74 ^
672e3e50 ^
d059fe74 ^
0e4a335e ^
672e3e50 ^

672e3e50 ^
d990e8f0 ^
4690ce81 ^
672e3e50 ^


65361948 ^

672e3e50 ^



4690ce81 ^

672e3e50 ^





dcc060c7 ^
672e3e50 ^
4690ce81 ^
beea7ce2 ^
672e3e50 ^

4690ce81 ^
dcc060c7 ^


672e3e50 ^

a654e4ec ^
4690ce81 ^
c5ffb6e1 ^
a654e4ec ^
4690ce81 ^
672e3e50 ^



4690ce81 ^
90560d71 ^








672e3e50 ^
f2043a73 ^
672e3e50 ^


a654e4ec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150