also update rcoords on configure request

This commit is contained in:
Julien Danjou 2007-11-15 15:14:40 +01:00
parent dd2c511181
commit e50041ab10
1 changed files with 4 additions and 8 deletions

12
event.c
View File

@ -145,17 +145,13 @@ handle_event_configurerequest(XEvent * e, awesome_config *awesomeconf)
awesomeconf[c->screen].ntags)->arrange == layout_floating) awesomeconf[c->screen].ntags)->arrange == layout_floating)
{ {
if(ev->value_mask & CWX) if(ev->value_mask & CWX)
c->x = ev->x; c->rx = c->x = ev->x;
if(ev->value_mask & CWY) if(ev->value_mask & CWY)
c->y = ev->y; c->ry = c->y = ev->y;
if(ev->value_mask & CWWidth) if(ev->value_mask & CWWidth)
c->w = ev->width; c->rw = c->w = ev->width;
if(ev->value_mask & CWHeight) if(ev->value_mask & CWHeight)
c->h = ev->height; c->rh = c->h = ev->height;
if((c->x + c->w) > DisplayWidth(c->display, c->phys_screen) && c->isfloating)
c->x = DisplayWidth(c->display, c->phys_screen) / 2 - c->w / 2; /* center in x direction */
if((c->y + c->h) > DisplayHeight(c->display, c->phys_screen) && c->isfloating)
c->y = DisplayHeight(c->display, c->phys_screen) / 2 - c->h / 2; /* center in y direction */
if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight))) if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
window_configure(c->display, c->win, c->x, c->y, c->w, c->h, c->border); window_configure(c->display, c->win, c->x, c->y, c->w, c->h, c->border);
/* recompute screen */ /* recompute screen */