[hackers] [wmii] Deal with Java AWT rendering inanity. Closes issue #5. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Thu, 8 Jul 2010 07:07:28 +0000 (UTC)

changeset: 2759:1f6866777547
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Thu Jul 08 03:07:08 2010 -0400
files: cmd/wmii/ewmh.c
description:
Deal with Java AWT rendering inanity. Closes issue #5.

diff -r 880f3967a1a7 -r 1f6866777547 cmd/wmii/ewmh.c
--- a/cmd/wmii/ewmh.c Wed Jul 07 22:47:39 2010 +0000
+++ b/cmd/wmii/ewmh.c Thu Jul 08 03:07:08 2010 -0400
@@ -181,6 +181,7 @@
         ewmh_getwintype(c);
         ewmh_getwinstate(c);
         ewmh_getstrut(c);
+ ewmh_framesize(c);
         ewmh_updateclientlist();
         pushhandler(&c->w, &client_handlers, c);
 }
@@ -501,18 +502,21 @@
 
 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));
Received on Thu Jul 08 2010 - 09:07:28 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 08 2010 - 09:12:04 CEST