aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw/x11-init.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-07-05 22:27:26 +0000
committerrsc <devnull@localhost>2006-07-05 22:27:26 +0000
commit2bdefab1da7bc64f433cba5871fc57d5524a06e1 (patch)
tree87c467d9f54195c54d339894d1d596bf48bdadad /src/cmd/devdraw/x11-init.c
parente50b313e64aedca5b2640b92d31bdf9bfccd4b53 (diff)
downloadplan9port-2bdefab1da7bc64f433cba5871fc57d5524a06e1.tar.gz
plan9port-2bdefab1da7bc64f433cba5871fc57d5524a06e1.tar.bz2
plan9port-2bdefab1da7bc64f433cba5871fc57d5524a06e1.zip
Fix resize error under KDE (Bart Locanthi)
Diffstat (limited to 'src/cmd/devdraw/x11-init.c')
-rw-r--r--src/cmd/devdraw/x11-init.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cmd/devdraw/x11-init.c b/src/cmd/devdraw/x11-init.c
index 9820ea24..bf1262ac 100644
--- a/src/cmd/devdraw/x11-init.c
+++ b/src/cmd/devdraw/x11-init.c
@@ -28,11 +28,18 @@ xerror(XDisplay *d, XErrorEvent *e)
return 0;
if(e->request_code == 18) /* XChangeProperty */
return 0;
+ /*
+ * BadDrawable happens in apps that get resized a LOT,
+ * e.g. when KDE is configured to resize continuously
+ * during a window drag.
+ */
+ if(e->error_code == 9) /* BadDrawable */
+ return 0;
- print("X error: error_code=%d, request_code=%d, minor=%d disp=%p\n",
+ fprint(2, "X error: error_code=%d, request_code=%d, minor=%d disp=%p\n",
e->error_code, e->request_code, e->minor_code, d);
XGetErrorText(d, e->error_code, buf, sizeof buf);
- print("%s\n", buf);
+ fprint(2, "%s\n", buf);
return 0;
}
@@ -681,8 +688,6 @@ _xconfigure(XEvent *e)
if(xe->width == Dx(_x.screenr) && xe->height == Dy(_x.screenr))
return 0;
- if(xe->width==0 || xe->height==0)
- fprint(2, "ignoring resize to %dx%d\n", xe->width, xe->height);
r = Rect(0, 0, xe->width, xe->height);
qlock(&_x.screenlock);
if(_x.screenpm != _x.nextscreenpm){