From d0b4575bf47bb848b09edbd5c5a0f27e889a976a Mon Sep 17 00:00:00 2001 From: "garbeam@gmail.com" Date: Wed, 20 Jul 2011 18:30:51 +0000 Subject: thanks to recursions on IRC for his remark --- dwm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dwm.c b/dwm.c index 01e8d1f..f955d44 100644 --- a/dwm.c +++ b/dwm.c @@ -615,14 +615,22 @@ configurerequest(XEvent *e) { c->bw = ev->border_width; else if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) { m = c->mon; - if(ev->value_mask & CWX) + if(ev->value_mask & CWX) { + c->oldx = c->x; c->x = m->mx + ev->x; - if(ev->value_mask & CWY) + } + if(ev->value_mask & CWY) { + c->oldy = c->y; c->y = m->my + ev->y; - if(ev->value_mask & CWWidth) + } + if(ev->value_mask & CWWidth) { + c->oldw = c->w; c->w = ev->width; - if(ev->value_mask & CWHeight) + } + if(ev->value_mask & CWHeight) { + c->oldh = c->h; c->h = ev->height; + } if((c->x + c->w) > m->mx + m->mw && c->isfloating) c->x = m->mx + (m->mw / 2 - c->w / 2); /* center in x direction */ if((c->y + c->h) > m->my + m->mh && c->isfloating) -- cgit v1.2.3