wmii

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

commit 1ede2c989512090b798b9f73da82288043db683c
parent 16670eb3fd66233fdbec94656603b2daff8155a6
Author: Kris Maglione <kris@suckless.org>
Date:   Thu,  8 Jul 2010 03:07:08 -0400

Deal with Java AWT rendering inanity. Closes issue #5.

Diffstat:
cmd/wmii/ewmh.c | 20++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/cmd/wmii/ewmh.c b/cmd/wmii/ewmh.c @@ -181,6 +181,7 @@ ewmh_initclient(Client *c) { ewmh_getwintype(c); ewmh_getwinstate(c); ewmh_getstrut(c); + ewmh_framesize(c); ewmh_updateclientlist(); pushhandler(&c->w, &client_handlers, c); } @@ -501,18 +502,21 @@ static Handlers root_handlers = { void ewmh_framesize(Client *c) { - Rectangle r; + Rectangle rc, rf; Frame *f; - f = c->sel; - r.min.x = f->crect.min.x; - r.min.y = f->crect.min.y; - r.max.x = Dx(f->r) - f->crect.max.x; - r.max.y = Dy(f->r) - f->crect.max.y; + if((f = c->sel)) { + rc = f->crect; + rf = f->r; + } + else { + rf = frame_client2rect(c, ZR, c->floating); + rc = rectsubpt(ZR, rf.min); + } long extents[] = { - r.min.x, r.max.x, - r.min.y, r.max.y, + rc.min.x, Dx(rf) - rc.max.x, + rc.min.y, Dy(rf) - rc.max.y, }; clientprop_long(c, PExtents, Net("FRAME_EXTENTS"), "CARDINAL", extents, nelem(extents));