summaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-19 11:03:27 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-19 11:03:27 +0100
commit3167373512c562f8f040203d2ee29084c76d00a0 (patch)
treea2e0c7cd972f7babd5b97ee04dfc923c6a069721 /event.c
parentdon't resize master if not in tiled mode (diff)
downloaddwm-3167373512c562f8f040203d2ee29084c76d00a0.tar.gz
dwm-3167373512c562f8f040203d2ee29084c76d00a0.zip
fixed configurerequest according to the problem Jukka reported
Diffstat (limited to '')
-rw-r--r--event.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/event.c b/event.c
index e20a60a..fbce631 100644
--- a/event.c
+++ b/event.c
@@ -165,6 +165,7 @@ buttonpress(XEvent *e) {
165 165
166static void 166static void
167configurerequest(XEvent *e) { 167configurerequest(XEvent *e) {
168 int x, y, w, h;
168 Client *c; 169 Client *c;
169 XConfigureRequestEvent *ev = &e->xconfigurerequest; 170 XConfigureRequestEvent *ev = &e->xconfigurerequest;
170 XWindowChanges wc; 171 XWindowChanges wc;
@@ -174,20 +175,24 @@ configurerequest(XEvent *e) {
174 if(ev->value_mask & CWBorderWidth) 175 if(ev->value_mask & CWBorderWidth)
175 c->border = ev->border_width; 176 c->border = ev->border_width;
176 if(c->isfixed || c->isfloat || (arrange == dofloat)) { 177 if(c->isfixed || c->isfloat || (arrange == dofloat)) {
177 if(ev->value_mask & CWX) 178 x = (ev->value_mask & CWX) ? ev->x : c->x;
178 c->x = ev->x; 179 y = (ev->value_mask & CWY) ? ev->y : c->y;
179 if(ev->value_mask & CWY) 180 w = (ev->value_mask & CWWidth) ? ev->width : c->w;
180 c->y = ev->y; 181 h = (ev->value_mask & CWHeight) ? ev->height : c->h;
181 if(ev->value_mask & CWWidth)
182 c->w = ev->width;
183 if(ev->value_mask & CWHeight)
184 c->h = ev->height;
185 if((ev->value_mask & (CWX | CWY)) 182 if((ev->value_mask & (CWX | CWY))
186 && !(ev->value_mask & (CWWidth | CWHeight))) 183 && !(ev->value_mask & (CWWidth | CWHeight)))
184 {
185 c->x = x;
186 c->y = y;
187 configure(c); 187 configure(c);
188 resize(c, c->x, c->y, c->w, c->h, False); 188 if(isvisible(c))
189 if(!isvisible(c)) 189 XMoveWindow(dpy, c->win, c->x, c->y);
190 ban(c); 190 }
191 else {
192 resize(c, x, y, w, h, False);
193 if(!isvisible(c))
194 ban(c);
195 }
191 } 196 }
192 else 197 else
193 configure(c); 198 configure(c);