From 673290d01966a3a64e4ae6e3a295e5f698ffe4a1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 1 Apr 2009 18:46:03 +0000 Subject: [PATCH] Adjust mouse for x offset. --- window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@ -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) {