plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit fe2b2de9844749c876df209bb8d9413e0074cbcf
parent ba60bab3cd247284977ff99573db0c1f3d056953
Author: Russ Cox <rsc@swtch.com>
Date:   Wed, 15 Jan 2020 11:25:36 -0500

devdraw: set windowrect correctly on x11 if window gets unexpected size

Fixes #54.

Diffstat:
Msrc/cmd/devdraw/x11-screen.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cmd/devdraw/x11-screen.c b/src/cmd/devdraw/x11-screen.c @@ -550,8 +550,6 @@ xattach(Client *client, char *label, char *winsize) havemin = 0; } w = newxwin(client); - w->screenrect = Rect(0, 0, WidthOfScreen(xscreen), HeightOfScreen(xscreen)); - w->windowrect = r; memset(&attr, 0, sizeof attr); attr.colormap = _x.cmap; @@ -679,6 +677,8 @@ xattach(Client *client, char *label, char *winsize) } }else fprint(2, "XGetWindowAttributes: bad attrs\n"); + w->screenrect = Rect(0, 0, WidthOfScreen(xscreen), HeightOfScreen(xscreen)); + w->windowrect = r; /* * Allocate our local backing store.