diff options
author | Thomas <thomas@xteddy.org> | 2013-08-16 11:58:32 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2013-08-20 00:02:38 +0100 |
commit | 5dbf3cb036d8093599494b8c02407e8d2d079f0d (patch) | |
tree | c70d12eb92abf5e8b413b6dcc9c530f4d0512b2e | |
parent | ddf929390e2780f8e53536a7c0b2f974a3ce2721 (diff) | |
download | rtmux-5dbf3cb036d8093599494b8c02407e8d2d079f0d.tar.gz rtmux-5dbf3cb036d8093599494b8c02407e8d2d079f0d.tar.bz2 rtmux-5dbf3cb036d8093599494b8c02407e8d2d079f0d.zip |
Assign mouse x/y coords before checking them
When receiving mouse inputs, we should set the x/y coordinates earlier than
we currently do, so that we aren't off-by-one in the case when the statusbar
is at the top of the screen.
-rw-r--r-- | tty-keys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -746,6 +746,8 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size) m->sgr = sgr; m->sgr_xb = sgr_b; m->sgr_rel = sgr_rel; + m->x = x; + m->y = y; if (b & 64) { /* wheel button */ b &= 3; if (b == 0) @@ -773,8 +775,6 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size) } m->button = (b & 3); } - m->x = x; - m->y = y; return (0); } |