diff options
author | rsc <devnull@localhost> | 2003-12-02 03:50:06 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-12-02 03:50:06 +0000 |
commit | ab5efca82f34bf17a46bd6d87cc5fa887a7095a7 (patch) | |
tree | 933afc81d00f1733eae2345360b6650760d5991a /src/libdraw | |
parent | e39b8b19286e7c6054953a88935442ec29a68eec (diff) | |
download | plan9port-ab5efca82f34bf17a46bd6d87cc5fa887a7095a7.tar.gz plan9port-ab5efca82f34bf17a46bd6d87cc5fa887a7095a7.tar.bz2 plan9port-ab5efca82f34bf17a46bd6d87cc5fa887a7095a7.zip |
Check for changed window size after window creation.
Diffstat (limited to 'src/libdraw')
-rw-r--r-- | src/libdraw/x11-init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libdraw/x11-init.c b/src/libdraw/x11-init.c index 085082df..6f87b412 100644 --- a/src/libdraw/x11-init.c +++ b/src/libdraw/x11-init.c @@ -155,6 +155,7 @@ xattach(char *label) XTextProperty name; XVisualInfo xvi; XWindow xrootwin; + XWindowAttributes wattr; XWMHints hint; /* @@ -303,6 +304,14 @@ xattach(char *label) &attr /* attributes (the above aren't?!) */ ); + if(!XGetWindowAttributes(_x.display, _x.drawable, &wattr)) + fprint(2, "XGetWindowAttributes failed\n"); + else if(wattr.width && wattr.height){ + r.max.x = wattr.width; + r.max.y = wattr.height; + if(0) fprint(2, "new rect %dx%d\n", r.max.x, r.max.y); + } + /* * Label and other properties required by ICCCCM. */ |