XMoveWindow(dpy, c->twin, c->tx + 2 * sw, c->ty);
}
+void
+configure(Client *c) {
+ XEvent synev;
+
+ synev.type = ConfigureNotify;
+ 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);
+}
+
void
focus(Client *c) {
Client *old;
else
wc.border_width = 1;
XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
+ configure(c);
XSync(dpy, False);
}
+#include <stdio.h>
/*
* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
switch (ev.type) {
case ButtonRelease:
+ resize(c, True, TopLeft);
XUngrabPointer(dpy, CurrentTime);
return;
case Expose:
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
switch(ev.type) {
case ButtonRelease:
+ resize(c, True, TopLeft);
XUngrabPointer(dpy, CurrentTime);
return;
case Expose:
XEvent synev;
XWindowChanges wc;
+ fputs("configurerequest\n", stderr);
if((c = getclient(ev->window))) {
c->ismax = False;
gravitate(c, True);
newmask = ev->value_mask & (~(CWSibling | CWStackMode | CWBorderWidth));
if(newmask)
XConfigureWindow(dpy, c->win, newmask, &wc);
- else {
- synev.type = ConfigureNotify;
- 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);
- }
+ else
+ configure(c);
XSync(dpy, False);
if(c->isfloat)
resize(c, False, TopLeft);
Client *c;
XCrossingEvent *ev = &e->xcrossing;
+ fputs("enternotify\n", stderr);
if(ev->mode != NotifyNormal || ev->detail == NotifyInferior)
return;
Window trans;
XPropertyEvent *ev = &e->xproperty;
+ fputs("propertynotify\n", stderr);
if(ev->state == PropertyDelete)
return; /* ignore */