|
|
@ -148,27 +148,35 @@ buttonpress(XEvent *e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
configurerequest(XEvent *e)
|
|
|
|
synconfig(Client *c, int x, int y, int w, int h, unsigned int border)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
unsigned long newmask;
|
|
|
|
|
|
|
|
Client *c;
|
|
|
|
|
|
|
|
XConfigureRequestEvent *ev = &e->xconfigurerequest;
|
|
|
|
|
|
|
|
XEvent synev;
|
|
|
|
XEvent synev;
|
|
|
|
XWindowChanges wc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if((c = getclient(ev->window))) {
|
|
|
|
|
|
|
|
if(!c->isfloat && (arrange != dofloat) && c->ismax) {
|
|
|
|
|
|
|
|
synev.type = ConfigureNotify;
|
|
|
|
synev.type = ConfigureNotify;
|
|
|
|
synev.xconfigure.display = dpy;
|
|
|
|
synev.xconfigure.display = dpy;
|
|
|
|
synev.xconfigure.event = c->win;
|
|
|
|
synev.xconfigure.event = c->win;
|
|
|
|
synev.xconfigure.window = c->win;
|
|
|
|
synev.xconfigure.window = c->win;
|
|
|
|
synev.xconfigure.x = sx;
|
|
|
|
synev.xconfigure.x = x;
|
|
|
|
synev.xconfigure.y = sy + bh;
|
|
|
|
synev.xconfigure.y = y;
|
|
|
|
synev.xconfigure.width = sw - 2;
|
|
|
|
synev.xconfigure.width = w;
|
|
|
|
synev.xconfigure.height = sw - 2 - bh;
|
|
|
|
synev.xconfigure.height = h;
|
|
|
|
synev.xconfigure.border_width = ev->border_width;
|
|
|
|
synev.xconfigure.border_width = border;
|
|
|
|
synev.xconfigure.above = None;
|
|
|
|
synev.xconfigure.above = None;
|
|
|
|
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
|
|
|
|
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
|
|
|
configurerequest(XEvent *e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned long newmask;
|
|
|
|
|
|
|
|
Client *c;
|
|
|
|
|
|
|
|
XConfigureRequestEvent *ev = &e->xconfigurerequest;
|
|
|
|
|
|
|
|
XWindowChanges wc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if((c = getclient(ev->window))) {
|
|
|
|
|
|
|
|
if(!c->isfloat && (arrange != dofloat) && c->ismax) {
|
|
|
|
|
|
|
|
synconfig(c, sx, sy + bh, sw - 2, sh - 2 - bh, ev->border_width);
|
|
|
|
|
|
|
|
XSync(dpy, False);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gravitate(c, True);
|
|
|
|
gravitate(c, True);
|
|
|
@ -190,19 +198,8 @@ configurerequest(XEvent *e)
|
|
|
|
newmask = ev->value_mask & (~(CWSibling | CWStackMode | CWBorderWidth));
|
|
|
|
newmask = ev->value_mask & (~(CWSibling | CWStackMode | CWBorderWidth));
|
|
|
|
if(newmask)
|
|
|
|
if(newmask)
|
|
|
|
XConfigureWindow(dpy, c->win, newmask, &wc);
|
|
|
|
XConfigureWindow(dpy, c->win, newmask, &wc);
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
synev.type = ConfigureNotify;
|
|
|
|
synconfig(c, c->x, c->y, c->w, c->h, c->border);
|
|
|
|
synev.xconfigure.display = dpy;
|
|
|
|
|
|
|
|
synev.xconfigure.event = c->win;
|
|
|
|
|
|
|
|
synev.xconfigure.window = c->win;
|
|
|
|
|
|
|
|
synev.xconfigure.x = c->x;
|
|
|
|
|
|
|
|
synev.xconfigure.y = c->y;
|
|
|
|
|
|
|
|
synev.xconfigure.width = c->w;
|
|
|
|
|
|
|
|
synev.xconfigure.height = c->h;
|
|
|
|
|
|
|
|
synev.xconfigure.border_width = c->border;
|
|
|
|
|
|
|
|
synev.xconfigure.above = None;
|
|
|
|
|
|
|
|
XSendEvent(dpy, c->win, True, NoEventMask, &synev);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
XSync(dpy, False);
|
|
|
|
XSync(dpy, False);
|
|
|
|
if(c->isfloat)
|
|
|
|
if(c->isfloat)
|
|
|
|
resize(c, False, TopLeft);
|
|
|
|
resize(c, False, TopLeft);
|
|
|
|