summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2010-07-21 11:55:16 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2010-07-21 11:55:16 +0200
commit51d4d80b5404546814d13f63fa1e632a55533c60 (patch)
tree308c8f5aa89144253d15f6cede69c68b52056e06 /mcwm.c
parent8bc5126791b4e3a5940a593ba4944ae7ed954ab5 (diff)
downloadmcwm-51d4d80b5404546814d13f63fa1e632a55533c60.zip
Take into account the window border as well.
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcwm.c b/mcwm.c
index a30b6fb..d17960c 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -1657,7 +1657,8 @@ void movestep(struct client *client, char direction)
* If the pointer was inside the window to begin with, move
* pointer back to where it was, relative to the window.
*/
- if (start_x > 0 && start_x < width && start_y > 0 && start_y < height )
+ if (start_x > 0 - BORDERWIDTH && start_x < width + BORDERWIDTH
+ && start_y > 0 - BORDERWIDTH && start_y < height + BORDERWIDTH )
{
xcb_warp_pointer(conn, XCB_NONE, win, 0, 0, 0, 0,
start_x, start_y);