diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-12 00:18:19 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-12 00:18:19 +0000 |
commit | b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072 (patch) | |
tree | 698ba80e7b13c711d195e1b4c75adad2bfcc7d5f /server.c | |
parent | 323469723b29fdd05a88e55ce9d3346f10506458 (diff) | |
download | rtmux-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 'server.c')
-rw-r--r-- | server.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.202 2009-10-12 00:14:44 tcunha Exp $ */ +/* $Id: server.c,v 1.203 2009-10-12 00:18:19 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -883,9 +883,9 @@ server_handle_client(struct client *c) struct timeval tv; struct key_binding *bd; struct keylist *keylist; + struct mouse_event mouse; int key, status, xtimeout, mode, isprefix; u_int i; - u_char mouse[3]; xtimeout = options_get_number(&c->session->options, "repeat-time"); if (xtimeout != 0 && c->flags & CLIENT_REPEAT) { @@ -897,7 +897,7 @@ server_handle_client(struct client *c) /* Process keys. */ keylist = options_get_data(&c->session->options, "prefix"); - while (tty_keys_next(&c->tty, &key, mouse) == 0) { + while (tty_keys_next(&c->tty, &key, &mouse) == 0) { if (c->session == NULL) return; @@ -925,10 +925,10 @@ server_handle_client(struct client *c) /* Check for mouse keys. */ if (key == KEYC_MOUSE) { if (options_get_number(oo, "mouse-select-pane")) { - window_set_active_at(w, mouse[1], mouse[2]); + window_set_active_at(w, mouse.x, mouse.y); wp = w->active; } - window_pane_mouse(wp, c, mouse[0], mouse[1], mouse[2]); + window_pane_mouse(wp, c, &mouse); continue; } |