From 199a0c6ebd4b9eb8a8b71aa1b1a8030355f6542b Mon Sep 17 00:00:00 2001 From: jacob Date: Sun, 11 Jun 2006 12:56:52 +0000 Subject: [PATCH] Do not send raw mouse events in the middle of a selection operation, even if we otherwise would (for instance, if Shift is released before the mouse button being used for selection). git-svn-id: svn://svn.tartarus.org/sgt/putty@6727 cda61777-01e9-0310-a592-d414129be87e --- terminal.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 806d650c..956af211 100644 --- a/terminal.c +++ b/terminal.c @@ -5578,7 +5578,16 @@ void term_mouse(Terminal *term, Mouse_Button braw, Mouse_Button bcooked, selpoint.x = x; unlineptr(ldata); - if (raw_mouse) { + /* + * If we're in the middle of a selection operation, we ignore raw + * mouse mode until it's done (we must have been not in raw mouse + * mode when it started). + * This makes use of Shift for selection reliable, and avoids the + * host seeing mouse releases for which they never saw corresponding + * presses. + */ + if (raw_mouse && + (term->selstate != ABOUT_TO) && (term->selstate != DRAGGING)) { int encstate = 0, r, c; char abuf[16]; -- 2.11.0