tdevdraw: set windowrect correctly on x11 if window gets unexpected size - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit fe2b2de9844749c876df209bb8d9413e0074cbcf
(DIR) parent ba60bab3cd247284977ff99573db0c1f3d056953
(HTM) 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:
M src/cmd/devdraw/x11-screen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/cmd/devdraw/x11-screen.c b/src/cmd/devdraw/x11-screen.c
t@@ -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;
t@@ -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.