summaryrefslogtreecommitdiffstats
path: root/src/cmd/rio/main.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-08-13 13:57:58 +0000
committerrsc <devnull@localhost>2004-08-13 13:57:58 +0000
commit2c1b986edff846e76c1ae7b04a23807055293366 (patch)
tree3ca122ef2c1274a669141ac1e8b5e6b4265d2a69 /src/cmd/rio/main.c
parent2fc26be665bc4b3fb27187ccb326f6a28bd6b9c7 (diff)
downloadplan9port-2c1b986edff846e76c1ae7b04a23807055293366.tar.gz
plan9port-2c1b986edff846e76c1ae7b04a23807055293366.zip
better mask handling, don't raise windows quite so eagerly.
Diffstat (limited to 'src/cmd/rio/main.c')
-rw-r--r--src/cmd/rio/main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cmd/rio/main.c b/src/cmd/rio/main.c
index 7c7e7146..d2da22b3 100644
--- a/src/cmd/rio/main.c
+++ b/src/cmd/rio/main.c
@@ -411,13 +411,14 @@ sendcmessage(Window w, Atom a, long x, int isroot, int usemask)
ev.xclient.format = 32;
ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = timestamp();
- if (usemask == 0)
- mask = 0;
- else if (isroot)
- mask = SubstructureRedirectMask; /* magic! */
- else
- mask = ExposureMask; /* not really correct but so be it */
- mask |= KeyPressMask; /* seems to be necessary */
+ mask = 0;
+ if(usemask){
+ mask |= KeyPressMask; /* seems to be necessary */
+ if (isroot)
+ mask |= SubstructureRedirectMask; /* magic! */
+ else
+ mask |= ExposureMask; /* not really correct but so be it */
+ }
status = XSendEvent(dpy, w, False, mask, &ev);
if (status == 0)
fprintf(stderr, "rio: sendcmessage failed\n");