about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-13 12:00:20 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-13 12:00:20 +0200
commit0a638a4cafb3dd754a596605bb55ac7977fba71e (patch)
tree0b309601028c0588a54feb47a1dab226e86a31a6
parent21553f9b4dc80a3afa0a76854dd2ae5ea5e1f4a1 (diff)
downloaddwm-0a638a4cafb3dd754a596605bb55ac7977fba71e.tar.gz
added pointer warps on kb-driven/manage-driven focus
-rw-r--r--client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/client.c b/client.c
index f92ac26..5e7321d 100644
--- a/client.c
+++ b/client.c
@@ -101,6 +101,7 @@ sel(void *aux)
 	if(!c)
 		c = stack;
 	craise(c);
+	XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
 	focus(c);
 }
 
@@ -235,6 +236,7 @@ focus(Client *c)
 	draw_client(c);
 	XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
 	XFlush(dpy);
+	discard_events(EnterWindowMask);
 }
 
 void
@@ -279,6 +281,7 @@ manage(Window w, XWindowAttributes *wa)
 	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);
 }
 
href='/akspecs/ranger/blame/examples/plugin_pmount.py?h=v1.9.2&id=76791a70467d7223a966aa9f12f5583b01d704a8'>^
6e8f001c ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42