aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2008-01-30 13:26:00 -0500
committerRuss Cox <rsc@swtch.com>2008-01-30 13:26:00 -0500
commit0f897f99ef576ae80a1e2d7cee29c498e3449b36 (patch)
treeb029217aeb89ee3fa7819f3f3f8d9b66a49b6174 /src/cmd/devdraw
parentc155dcfeb74766db97c08d7a09cca4b42ba45f0f (diff)
downloadplan9port-0f897f99ef576ae80a1e2d7cee29c498e3449b36.tar.gz
plan9port-0f897f99ef576ae80a1e2d7cee29c498e3449b36.tar.bz2
plan9port-0f897f99ef576ae80a1e2d7cee29c498e3449b36.zip
devdraw, rio: more full-screen nonsense
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/x11-init.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/cmd/devdraw/x11-init.c b/src/cmd/devdraw/x11-init.c
index 4d907493..7e795906 100644
--- a/src/cmd/devdraw/x11-init.c
+++ b/src/cmd/devdraw/x11-init.c
@@ -690,18 +690,10 @@ _xconfigure(XEvent *e)
XConfigureEvent *xe = (XConfigureEvent*)e;
if(!fullscreen){
- // I can't figure this out: apparently window managers
- // (e.g., rio, twm) send ConfigureEvents using absolute
- // screen coordinates, but X sends events using coordinates
- // relative to the parent window.
- if(xe->send_event)
- windowrect = Rect(xe->x, xe->y, xe->x+xe->width, xe->y+xe->height);
- else{
- int rx, ry;
- XWindow w;
- if(XTranslateCoordinates(_x.display, _x.drawable, DefaultRootWindow(_x.display), xe->x, xe->y, &rx, &ry, &w))
- windowrect = Rect(rx, ry, rx+xe->width, ry+xe->height);
- }
+ int rx, ry;
+ XWindow w;
+ if(XTranslateCoordinates(_x.display, _x.drawable, DefaultRootWindow(_x.display), 0, 0, &rx, &ry, &w))
+ windowrect = Rect(rx, ry, rx+xe->width, ry+xe->height);
}
if(xe->width == Dx(_x.screenr) && xe->height == Dy(_x.screenr))