summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2011-07-26 21:51:53 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2011-07-26 21:51:53 +0200
commitf058f5bcde855f1a8315fc562b568381e169f912 (patch)
treede0d7ec5158dcbf5a84f89eded32feffcb97e336
parentbab8ae2a3d0b8c6860175a523297216c4e74600f (diff)
downloadmcwm-f058f5bcde855f1a8315fc562b568381e169f912.zip
Warp to middle of window instead of corner when tabbing. Makes it
easier if you want to paste something with middle button without having to move the pointer to get pointer focus first.
-rw-r--r--NEWS6
-rw-r--r--mcwm.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5160829..6747a94 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@
User visible changes
+2011-07-26
+
+ * Tabbing warps to middle of window instead of corner. Makes it
+ easier if you want to paste something with middle button without
+ having to move the pointer.
+
2011-07-20
* Speedup when using a trackball or high CPI mouse. Use only mouse
diff --git a/mcwm.c b/mcwm.c
index e547b0a..675c002 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -1927,7 +1927,8 @@ void focusnext(void)
xcb_configure_window(conn, client->id, XCB_CONFIG_WINDOW_STACK_MODE,
values);
- xcb_warp_pointer(conn, XCB_NONE, client->id, 0, 0, 0, 0, 0, 0);
+ xcb_warp_pointer(conn, XCB_NONE, client->id, 0, 0, 0, 0,
+ client->width / 2, client->height / 2);
setfocus(client);
}
}