aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio/main.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-08-06 12:57:43 +0000
committerrsc <devnull@localhost>2004-08-06 12:57:43 +0000
commit56afeac8ea058ac0c0637df224e8a55450691eed (patch)
treefb1f900d743e9e78f13eab88bfdbbad417a841e6 /src/cmd/rio/main.c
parent0fa6e0cfbf480077fadc0cb5f3fd8d1ebad5b00e (diff)
downloadplan9port-56afeac8ea058ac0c0637df224e8a55450691eed.tar.gz
plan9port-56afeac8ea058ac0c0637df224e8a55450691eed.tar.bz2
plan9port-56afeac8ea058ac0c0637df224e8a55450691eed.zip
different delete handling from axel.
who knows what it fixes or breaks.
Diffstat (limited to 'src/cmd/rio/main.c')
-rw-r--r--src/cmd/rio/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cmd/rio/main.c b/src/cmd/rio/main.c
index 22395d70..7c7e7146 100644
--- a/src/cmd/rio/main.c
+++ b/src/cmd/rio/main.c
@@ -143,12 +143,12 @@ main(int argc, char *argv[])
curtime = -1; /* don't care */
if (do_exit) {
- sendcmessage(DefaultRootWindow(dpy), exit_rio, 0L, 1);
+ sendcmessage(DefaultRootWindow(dpy), exit_rio, 0L, 1, 1);
XSync(dpy, False);
exit(0);
}
if (do_restart) {
- sendcmessage(DefaultRootWindow(dpy), restart_rio, 0L, 1);
+ sendcmessage(DefaultRootWindow(dpy), restart_rio, 0L, 1, 1);
XSync(dpy, False);
exit(0);
}
@@ -398,7 +398,7 @@ timestamp(void)
}
void
-sendcmessage(Window w, Atom a, long x, int isroot)
+sendcmessage(Window w, Atom a, long x, int isroot, int usemask)
{
XEvent ev;
int status;
@@ -411,8 +411,9 @@ sendcmessage(Window w, Atom a, long x, int isroot)
ev.xclient.format = 32;
ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = timestamp();
- mask = 0L;
- if (isroot)
+ if (usemask == 0)
+ mask = 0;
+ else if (isroot)
mask = SubstructureRedirectMask; /* magic! */
else
mask = ExposureMask; /* not really correct but so be it */