|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
|
|
|
* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
|
|
|
* See LICENSE file for license details. |
|
|
|
* See LICENSE file for license details. |
|
|
@ -38,6 +39,7 @@ movemouse(Client *c) { |
|
|
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); |
|
|
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); |
|
|
|
switch (ev.type) { |
|
|
|
switch (ev.type) { |
|
|
|
case ButtonRelease: |
|
|
|
case ButtonRelease: |
|
|
|
|
|
|
|
resize(c, True, TopLeft); |
|
|
|
XUngrabPointer(dpy, CurrentTime); |
|
|
|
XUngrabPointer(dpy, CurrentTime); |
|
|
|
return; |
|
|
|
return; |
|
|
|
case Expose: |
|
|
|
case Expose: |
|
|
@ -71,6 +73,7 @@ resizemouse(Client *c) { |
|
|
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); |
|
|
|
XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); |
|
|
|
switch(ev.type) { |
|
|
|
switch(ev.type) { |
|
|
|
case ButtonRelease: |
|
|
|
case ButtonRelease: |
|
|
|
|
|
|
|
resize(c, True, TopLeft); |
|
|
|
XUngrabPointer(dpy, CurrentTime); |
|
|
|
XUngrabPointer(dpy, CurrentTime); |
|
|
|
return; |
|
|
|
return; |
|
|
|
case Expose: |
|
|
|
case Expose: |
|
|
@ -151,6 +154,7 @@ configurerequest(XEvent *e) { |
|
|
|
XEvent synev; |
|
|
|
XEvent synev; |
|
|
|
XWindowChanges wc; |
|
|
|
XWindowChanges wc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fputs("configurerequest\n", stderr); |
|
|
|
if((c = getclient(ev->window))) { |
|
|
|
if((c = getclient(ev->window))) { |
|
|
|
c->ismax = False; |
|
|
|
c->ismax = False; |
|
|
|
gravitate(c, True); |
|
|
|
gravitate(c, True); |
|
|
@ -172,19 +176,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; |
|
|
|
configure(c); |
|
|
|
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); |
|
|
@ -218,6 +211,7 @@ enternotify(XEvent *e) { |
|
|
|
Client *c; |
|
|
|
Client *c; |
|
|
|
XCrossingEvent *ev = &e->xcrossing; |
|
|
|
XCrossingEvent *ev = &e->xcrossing; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fputs("enternotify\n", stderr); |
|
|
|
if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) |
|
|
|
if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
@ -305,6 +299,7 @@ propertynotify(XEvent *e) { |
|
|
|
Window trans; |
|
|
|
Window trans; |
|
|
|
XPropertyEvent *ev = &e->xproperty; |
|
|
|
XPropertyEvent *ev = &e->xproperty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fputs("propertynotify\n", stderr); |
|
|
|
if(ev->state == PropertyDelete) |
|
|
|
if(ev->state == PropertyDelete) |
|
|
|
return; /* ignore */ |
|
|
|
return; /* ignore */ |
|
|
|
|
|
|
|
|
|
|
|