aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-04-01 18:46:03 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-04-01 18:46:03 +0000
commit673290d01966a3a64e4ae6e3a295e5f698ffe4a1 (patch)
tree3c8e05c89456aec1d1b2bd895b3e7a3ebe745dad /window.c
parent15362ef6b877d19f7cd90a972a0683c9386e687d (diff)
downloadrtmux-673290d01966a3a64e4ae6e3a295e5f698ffe4a1.tar.gz
rtmux-673290d01966a3a64e4ae6e3a295e5f698ffe4a1.tar.bz2
rtmux-673290d01966a3a64e4ae6e3a295e5f698ffe4a1.zip
Adjust mouse for x offset.
Diffstat (limited to 'window.c')
-rw-r--r--window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/window.c b/window.c
index 55019e13..279cc85d 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.71 2009-04-01 18:21:42 nicm Exp $ */
+/* $Id: window.c,v 1.72 2009-04-01 18:46:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -684,8 +684,11 @@ window_pane_mouse(
{
/* XXX convert from 1-based? */
+ if (x < wp->xoff || x >= wp->xoff + wp->sx)
+ return;
if (y < wp->yoff || y >= wp->yoff + wp->sy)
return;
+ x -= wp->xoff;
y -= wp->yoff;
if (wp->mode != NULL) {