about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
authoranselm@anselm1 <unknown>2008-02-25 22:19:17 +0000
committeranselm@anselm1 <unknown>2008-02-25 22:19:17 +0000
commit2bfd3fffbf5c913acfb7f56bdd7a29dc39d6d5d5 (patch)
tree21d772d5af195df251c3e3577d47dd711ab86c05 /dwm.c
parenta3d8c05a95edbd4dad544c3373301551440c8092 (diff)
downloaddwm-2bfd3fffbf5c913acfb7f56bdd7a29dc39d6d5d5.tar.gz
certain fixes, though still a lot of the mutex stuff missing
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/dwm.c b/dwm.c
index 01d40f1..3a789d9 100644
--- a/dwm.c
+++ b/dwm.c
@@ -560,10 +560,10 @@ drawbar(View *v) {
 	Client *c;
 
 	dc.x = 0;
-	for(c = stack; c && !isvisible(c); c = c->snext);
+	for(c = stack; c && (!isvisible(c) || getview(c) != v); c = c->snext);
 	for(i = 0; i < LENGTH(tags); i++) {
 		dc.w = textw(tags[i]);
-		if(seltags[i]) {
+		if(seltags[i] && seltags[i] == v->id) {
 			drawtext(v, tags[i], dc.sel, isurgent(i));
 			drawsquare(v, c && c->tags[i], isoccupied(i), isurgent(i), dc.sel);
 		}
@@ -724,7 +724,7 @@ focus(Client *c) {
 	if(selview != v)
 		drawbar(v);
 	if(!c || (c && !isvisible(c)))
-		for(c = stack; c && !isvisible(c); c = c->snext);
+		for(c = stack; c && (!isvisible(c) || getview(c) != selview); c = c->snext);
 	if(sel && sel != c) {
 		grabbuttons(sel, False);
 		XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
@@ -1156,9 +1156,8 @@ viewat() {
 	XQueryPointer(dpy, root, &win, &win, &x, &y, &i, &i, &mask);
 	for(i = 0; i < nviews; i++) {
 		if((x >= views[i].x && x < views[i].x + views[i].w)
-		&& (y >= views[i].y && y < views[i].y + views[i].h)) {
+		&& (y >= views[i].y && y < views[i].y + views[i].h))
 			return &views[i];
-		}
 	}
 	return NULL;
 }
@@ -1761,7 +1760,6 @@ tile(View *v) {
 			else
 				nh = th - 2 * c->border;
 		}
-		fprintf(stderr, "tile %d %d %d %d\n", nx, ny, nw, nh);
 		resize(c, nx, ny, nw, nh, RESIZEHINTS);
 		if((RESIZEHINTS) && ((c->h < bh) || (c->h > nh) || (c->w < bh) || (c->w > nw)))
 			/* client doesn't accept size constraints */