tdifferent delete handling from axel. who knows what it fixes or breaks. - plan… | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 56afeac8ea058ac0c0637df224e8a55450691eed | |
parent 0fa6e0cfbf480077fadc0cb5f3fd8d1ebad5b00e | |
Author: rsc <devnull@localhost> | |
Date: Fri, 6 Aug 2004 12:57:43 +0000 | |
different delete handling from axel. | |
who knows what it fixes or breaks. | |
Diffstat: | |
M src/cmd/rio/client.c | 4 ++-- | |
M src/cmd/rio/main.c | 11 ++++++----- | |
2 files changed, 8 insertions(+), 7 deletions(-) | |
--- | |
diff --git a/src/cmd/rio/client.c b/src/cmd/rio/client.c | |
t@@ -23,11 +23,11 @@ setactive(Client *c, int on) | |
XUngrabButton(dpy, AnyButton, AnyModifier, c->parent); | |
XSetInputFocus(dpy, c->window, RevertToPointerRoot, timestamp(… | |
if (c->proto & Ptakefocus) | |
- sendcmessage(c->window, wm_protocols, wm_take_focus, 0… | |
+ sendcmessage(c->window, wm_protocols, wm_take_focus, 0… | |
cmapfocus(c); | |
} else { | |
if (c->proto & Plosefocus) | |
- sendcmessage(c->window, wm_protocols, wm_lose_focus, 0… | |
+ sendcmessage(c->window, wm_protocols, wm_lose_focus, 0… | |
XGrabButton(dpy, AnyButton, AnyModifier, c->parent, False, | |
ButtonMask, GrabModeAsync, GrabModeSync, None, None); | |
} | |
diff --git a/src/cmd/rio/main.c b/src/cmd/rio/main.c | |
t@@ -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); | |
} | |
t@@ -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; | |
t@@ -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… |