different delete handling from axel.
who knows what it fixes or breaks.
This commit is contained in:
parent
0fa6e0cfbf
commit
56afeac8ea
2 changed files with 8 additions and 7 deletions
|
|
@ -23,11 +23,11 @@ setactive(Client *c, int on)
|
||||||
XUngrabButton(dpy, AnyButton, AnyModifier, c->parent);
|
XUngrabButton(dpy, AnyButton, AnyModifier, c->parent);
|
||||||
XSetInputFocus(dpy, c->window, RevertToPointerRoot, timestamp());
|
XSetInputFocus(dpy, c->window, RevertToPointerRoot, timestamp());
|
||||||
if (c->proto & Ptakefocus)
|
if (c->proto & Ptakefocus)
|
||||||
sendcmessage(c->window, wm_protocols, wm_take_focus, 0);
|
sendcmessage(c->window, wm_protocols, wm_take_focus, 0, 0);
|
||||||
cmapfocus(c);
|
cmapfocus(c);
|
||||||
} else {
|
} else {
|
||||||
if (c->proto & Plosefocus)
|
if (c->proto & Plosefocus)
|
||||||
sendcmessage(c->window, wm_protocols, wm_lose_focus, 0);
|
sendcmessage(c->window, wm_protocols, wm_lose_focus, 0, 0);
|
||||||
XGrabButton(dpy, AnyButton, AnyModifier, c->parent, False,
|
XGrabButton(dpy, AnyButton, AnyModifier, c->parent, False,
|
||||||
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
|
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,12 +143,12 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
curtime = -1; /* don't care */
|
curtime = -1; /* don't care */
|
||||||
if (do_exit) {
|
if (do_exit) {
|
||||||
sendcmessage(DefaultRootWindow(dpy), exit_rio, 0L, 1);
|
sendcmessage(DefaultRootWindow(dpy), exit_rio, 0L, 1, 1);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if (do_restart) {
|
if (do_restart) {
|
||||||
sendcmessage(DefaultRootWindow(dpy), restart_rio, 0L, 1);
|
sendcmessage(DefaultRootWindow(dpy), restart_rio, 0L, 1, 1);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
@ -398,7 +398,7 @@ timestamp(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sendcmessage(Window w, Atom a, long x, int isroot)
|
sendcmessage(Window w, Atom a, long x, int isroot, int usemask)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
int status;
|
int status;
|
||||||
|
|
@ -411,8 +411,9 @@ sendcmessage(Window w, Atom a, long x, int isroot)
|
||||||
ev.xclient.format = 32;
|
ev.xclient.format = 32;
|
||||||
ev.xclient.data.l[0] = x;
|
ev.xclient.data.l[0] = x;
|
||||||
ev.xclient.data.l[1] = timestamp();
|
ev.xclient.data.l[1] = timestamp();
|
||||||
mask = 0L;
|
if (usemask == 0)
|
||||||
if (isroot)
|
mask = 0;
|
||||||
|
else if (isroot)
|
||||||
mask = SubstructureRedirectMask; /* magic! */
|
mask = SubstructureRedirectMask; /* magic! */
|
||||||
else
|
else
|
||||||
mask = ExposureMask; /* not really correct but so be it */
|
mask = ExposureMask; /* not really correct but so be it */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue