foo-wm

(Archived) Experimental Zooming IPC-based WM
git clone http://milesalan.com/git/foo-wm
Log | Files | Refs | Mirror | README | LICENSE

commit 2e0047ec7a2a8e8f748eff1e7922b141652861b9
parent 331617d969552d05b1ff7ea683621c89f908e0fa
Author: Miles Sandlar <miles.sandlar@gmail.com>
Date:   Wed, 21 Nov 2012 15:07:31 -0500

Windows sending configure before map configured
xterm no longer has long delay to get mapped

Diffstat:
Msrc/events.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/events.c b/src/events.c @@ -70,16 +70,13 @@ void eDestroyNotify(XEvent *event) { } void eConfigureRequest(XEvent *e) { - /* Structed From DWM */ XConfigureRequestEvent *ev = &e->xconfigurerequest; Node *configuredNode = getNodeByWindow(&ev->window); - if (!configuredNode) return; - XWindowChanges wc; - wc.x = configuredNode -> x; - wc.y = configuredNode -> y; + wc.x = configuredNode ? configuredNode -> x : ev -> x; + wc.y = configuredNode ? configuredNode -> y : ev -> y; wc.width = ev->width; wc.height = ev->height; wc.border_width = ev->border_width; @@ -87,10 +84,12 @@ void eConfigureRequest(XEvent *e) { wc.stack_mode = ev->detail; XConfigureWindow(display, ev->window, ev->value_mask, &wc); - placeNode(configuredNode, + if (configuredNode) + placeNode(configuredNode, configuredNode -> x, configuredNode -> y, configuredNode -> width, configuredNode -> height); + XSync(display, False); } void eResizeRequest(XEvent *event) {