Browse Source

thanks to recursions on IRC for his remark

master
garbeam@gmail.com 14 years ago
parent
commit
d0b4575bf4
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      dwm.c

+ 12
- 4
dwm.c View File

@ -615,14 +615,22 @@ configurerequest(XEvent *e) {
c->bw = ev->border_width; c->bw = ev->border_width;
else if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) { else if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
m = c->mon; m = c->mon;
if(ev->value_mask & CWX)
if(ev->value_mask & CWX) {
c->oldx = c->x;
c->x = m->mx + ev->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; c->y = m->my + ev->y;
if(ev->value_mask & CWWidth)
}
if(ev->value_mask & CWWidth) {
c->oldw = c->w;
c->w = ev->width; c->w = ev->width;
if(ev->value_mask & CWHeight)
}
if(ev->value_mask & CWHeight) {
c->oldh = c->h;
c->h = ev->height; c->h = ev->height;
}
if((c->x + c->w) > m->mx + m->mw && c->isfloating) 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 */ 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) if((c->y + c->h) > m->my + m->mh && c->isfloating)


Loading…
Cancel
Save