aboutsummaryrefslogtreecommitdiff
path: root/window-copy.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-12 00:18:19 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-12 00:18:19 +0000
commitb26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072 (patch)
tree698ba80e7b13c711d195e1b4c75adad2bfcc7d5f /window-copy.c
parent323469723b29fdd05a88e55ce9d3346f10506458 (diff)
downloadrtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.tar.gz
rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.tar.bz2
rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.zip
Sync OpenBSD patchset 381:
Clean up by introducing a wrapper struct for mouse clicks rather than passing three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
Diffstat (limited to 'window-copy.c')
-rw-r--r--window-copy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/window-copy.c b/window-copy.c
index 66273d45..34f587ec 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -1,4 +1,4 @@
-/* $Id: window-copy.c,v 1.87 2009-10-06 14:10:10 tcunha Exp $ */
+/* $Id: window-copy.c,v 1.88 2009-10-12 00:18:19 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -29,7 +29,7 @@ void window_copy_resize(struct window_pane *, u_int, u_int);
void window_copy_key(struct window_pane *, struct client *, int);
int window_copy_key_input(struct window_pane *, int);
void window_copy_mouse(
- struct window_pane *, struct client *, u_char, u_char, u_char);
+ struct window_pane *, struct client *, struct mouse_event *);
void window_copy_redraw_lines(struct window_pane *, u_int, u_int);
void window_copy_redraw_screen(struct window_pane *);
@@ -418,20 +418,20 @@ window_copy_key_input(struct window_pane *wp, int key)
}
void
-window_copy_mouse(struct window_pane *wp,
- unused struct client *c, u_char b, u_char x, u_char y)
+window_copy_mouse(
+ struct window_pane *wp, unused struct client *c, struct mouse_event *m)
{
struct window_copy_mode_data *data = wp->modedata;
struct screen *s = &data->screen;
- if ((b & 3) == 3)
+ if ((m->b & 3) == 3)
return;
- if (x >= screen_size_x(s))
+ if (m->x >= screen_size_x(s))
return;
- if (y >= screen_size_y(s))
+ if (m->y >= screen_size_y(s))
return;
- window_copy_update_cursor(wp, x, y);
+ window_copy_update_cursor(wp, m->x, m->y);
if (window_copy_update_selection(wp))
window_copy_redraw_screen(wp);
}