Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
21553f9
)
added pointer warps on kb-driven/manage-driven focus
author
Anselm R. Garbe <
[email protected]
>
Thu, 13 Jul 2006 10:00:20 +0000
(12:00 +0200)
committer
Anselm R. Garbe <
[email protected]
>
Thu, 13 Jul 2006 10:00:20 +0000
(12:00 +0200)
client.c
patch
|
blob
|
history
diff --git
a/client.c
b/client.c
index
f92ac26
..
5e7321d
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-101,6
+101,7
@@
sel(void *aux)
if(!c)
c = stack;
craise(c);
if(!c)
c = stack;
craise(c);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
focus(c);
}
focus(c);
}
@@
-235,6
+236,7
@@
focus(Client *c)
draw_client(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XFlush(dpy);
draw_client(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XFlush(dpy);
+ discard_events(EnterWindowMask);
}
void
}
void
@@
-279,6
+281,7
@@
manage(Window w, XWindowAttributes *wa)
XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
GrabModeAsync, GrabModeSync, None, None);
arrange();
XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
GrabModeAsync, GrabModeSync, None, None);
arrange();
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
focus(c);
}
focus(c);
}