about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-06-06 11:43:14 +0200
committerAnselm R. Garbe <arg@suckless.org>2007-06-06 11:43:14 +0200
commitc95bf3db9dcbf48428140bca6c2f86129977cc6c (patch)
treebdc63edf9ee1c024c0927eeb219fae854330c99e
parent4bf3b019535da3aa14cfccebd65ea726cbd15862 (diff)
downloaddwm-c95bf3db9dcbf48428140bca6c2f86129977cc6c.tar.gz
applied restack patch of anydot, with slight changes
-rw-r--r--layout.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/layout.c b/layout.c
index acf0a8e..f8c92ee 100644
--- a/layout.c
+++ b/layout.c
@@ -164,6 +164,7 @@ void
 restack(void) {
 	Client *c;
 	XEvent ev;
+	XWindowChanges wc;
 
 	drawstatus();
 	if(!sel)
@@ -171,12 +172,17 @@ restack(void) {
 	if(sel->isfloating || lt->arrange == floating)
 		XRaiseWindow(dpy, sel->win);
 	if(lt->arrange != floating) {
-		if(!sel->isfloating)
-			XLowerWindow(dpy, sel->win);
+		wc.stack_mode = Below;
+		wc.sibling = barwin;
+		if(!sel->isfloating) {
+			XConfigureWindow(dpy, sel->win, CWSibling | CWStackMode, &wc);
+			wc.sibling = sel->win;
+		}
 		for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
 			if(c == sel)
 				continue;
-			XLowerWindow(dpy, c->win);
+			XConfigureWindow(dpy, c->win, CWSibling | CWStackMode, &wc);
+			wc.sibling = c->win;
 		}
 	}
 	XSync(dpy, False);
8644bfcc4'>^
15b43d3 ^
6bdc3d1 ^














15b43d3 ^
6bdc3d1 ^















15b43d3 ^
6bdc3d1 ^





















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