Check for changed window size after window creation.
This commit is contained in:
parent
e39b8b1928
commit
ab5efca82f
1 changed files with 9 additions and 0 deletions
|
|
@ -155,6 +155,7 @@ xattach(char *label)
|
||||||
XTextProperty name;
|
XTextProperty name;
|
||||||
XVisualInfo xvi;
|
XVisualInfo xvi;
|
||||||
XWindow xrootwin;
|
XWindow xrootwin;
|
||||||
|
XWindowAttributes wattr;
|
||||||
XWMHints hint;
|
XWMHints hint;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -303,6 +304,14 @@ xattach(char *label)
|
||||||
&attr /* attributes (the above aren't?!) */
|
&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.
|
* Label and other properties required by ICCCCM.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue