wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit d29968a50d24164f638e72b6ab36383585fb11e4
parent 622ac75b4affbfc8499251d6a5ca00efd0ed23b7
Author: Kris Maglione <jg@suckless.org>
Date:   Sun, 11 Feb 2007 14:45:14 -0500

Unmap client on opaque moves. Will this improve resource usage?


Diffstat:
client.c | 2+-
mouse.c | 9++++++---
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/client.c b/client.c @@ -51,7 +51,7 @@ create_client(Window w, XWindowAttributes *wa) { c->rect.height + def.border + labelh(&def.font), 0, DefaultDepth(blz.dpy, blz.screen), CopyFromParent, DefaultVisual(blz.dpy, blz.screen), - CWOverrideRedirect | CWBackPixmap | CWEventMask, &fwa); + CWOverrideRedirect | CWEventMask, &fwa); c->gc = XCreateGC(blz.dpy, c->framewin, 0, 0); XSync(blz.dpy, False); for(t=&client; *t; t=&(*t)->next); diff --git a/mouse.c b/mouse.c @@ -375,7 +375,9 @@ do_mouse_resize(Client *c, Bool grabbox, BlitzAlign align) { if(!grabbox) { XGrabServer(blz.dpy); draw_xor_border(&frect); - } + }else + unmap_client(c, IconicState); + for(;;) { XMaskEvent(blz.dpy, MouseMask | ExposureMask, &ev); switch (ev.type) { @@ -397,7 +399,8 @@ do_mouse_resize(Client *c, Bool grabbox, BlitzAlign align) { pt_y = screen->brect.y - 1; XWarpPointer(blz.dpy, None, blz.root, 0, 0, 0, 0, pt_x, pt_y); XUngrabServer(blz.dpy); - } + }else + map_client(c); if(rects) free(rects); @@ -435,7 +438,7 @@ do_mouse_resize(Client *c, Bool grabbox, BlitzAlign align) { match_sizehints(c, &frect, floating, grav); if(grabbox) { - resize_client(c, &frect); + XMoveWindow(blz.dpy, c->framewin, frect.x, frect.y); XSync(blz.dpy, False); } else { draw_xor_border(&ofrect);