summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--event.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/event.c b/event.c
index fbce631..153b49a 100644
--- a/event.c
+++ b/event.c
@@ -165,7 +165,6 @@ buttonpress(XEvent *e) {
165 165
166static void 166static void
167configurerequest(XEvent *e) { 167configurerequest(XEvent *e) {
168 int x, y, w, h;
169 Client *c; 168 Client *c;
170 XConfigureRequestEvent *ev = &e->xconfigurerequest; 169 XConfigureRequestEvent *ev = &e->xconfigurerequest;
171 XWindowChanges wc; 170 XWindowChanges wc;
@@ -175,21 +174,23 @@ configurerequest(XEvent *e) {
175 if(ev->value_mask & CWBorderWidth) 174 if(ev->value_mask & CWBorderWidth)
176 c->border = ev->border_width; 175 c->border = ev->border_width;
177 if(c->isfixed || c->isfloat || (arrange == dofloat)) { 176 if(c->isfixed || c->isfloat || (arrange == dofloat)) {
178 x = (ev->value_mask & CWX) ? ev->x : c->x; 177 if(ev->value_mask & CWX)
179 y = (ev->value_mask & CWY) ? ev->y : c->y; 178 c->x = ev->x;
180 w = (ev->value_mask & CWWidth) ? ev->width : c->w; 179 if(ev->value_mask & CWY)
181 h = (ev->value_mask & CWHeight) ? ev->height : c->h; 180 c->y = ev->y;
181 if(ev->value_mask & CWWidth)
182 c->w = ev->width;
183 if(ev->value_mask & CWHeight)
184 c->h = ev->height;
182 if((ev->value_mask & (CWX | CWY)) 185 if((ev->value_mask & (CWX | CWY))
183 && !(ev->value_mask & (CWWidth | CWHeight))) 186 && !(ev->value_mask & (CWWidth | CWHeight)))
184 { 187 {
185 c->x = x;
186 c->y = y;
187 configure(c); 188 configure(c);
188 if(isvisible(c)) 189 if(isvisible(c))
189 XMoveWindow(dpy, c->win, c->x, c->y); 190 XMoveWindow(dpy, c->win, c->x, c->y);
190 } 191 }
191 else { 192 else {
192 resize(c, x, y, w, h, False); 193 XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
193 if(!isvisible(c)) 194 if(!isvisible(c))
194 ban(c); 195 ban(c);
195 } 196 }