mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
Rev 1.189 [r1517] of this file introduced a bug. While it is correct
to avoid calling term_out() during a drag-select, it's false to
assume that all drags are selects - some are xterm mouse-reported
drags, and term_out absolutely _should_ be called in those so that
the application can show the dragged object moving. Should now be
fixed.
[originally from svn r1590]
[r1517 == 02a926f6c1
]
This commit is contained in:
parent
9600d8815a
commit
8375ad6bd8
17
window.c
17
window.c
@ -728,7 +728,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
timer_id = 0;
|
timer_id = 0;
|
||||||
}
|
}
|
||||||
HideCaret(hwnd);
|
HideCaret(hwnd);
|
||||||
if (GetCapture() != hwnd)
|
if (GetCapture() != hwnd ||
|
||||||
|
(send_raw_mouse && !(cfg.mouse_override && is_shift_pressed())))
|
||||||
term_out();
|
term_out();
|
||||||
term_update();
|
term_update();
|
||||||
ShowCaret(hwnd);
|
ShowCaret(hwnd);
|
||||||
@ -1521,6 +1522,17 @@ static int is_alt_pressed(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int is_shift_pressed(void)
|
||||||
|
{
|
||||||
|
BYTE keystate[256];
|
||||||
|
int r = GetKeyboardState(keystate);
|
||||||
|
if (!r)
|
||||||
|
return FALSE;
|
||||||
|
if (keystate[VK_SHIFT] & 0x80)
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static int resizing;
|
static int resizing;
|
||||||
|
|
||||||
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||||
@ -1535,7 +1547,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
case WM_TIMER:
|
case WM_TIMER:
|
||||||
if (pending_netevent)
|
if (pending_netevent)
|
||||||
enact_pending_netevent();
|
enact_pending_netevent();
|
||||||
if (GetCapture() != hwnd)
|
if (GetCapture() != hwnd ||
|
||||||
|
(send_raw_mouse && !(cfg.mouse_override && is_shift_pressed())))
|
||||||
term_out();
|
term_out();
|
||||||
noise_regular();
|
noise_regular();
|
||||||
HideCaret(hwnd);
|
HideCaret(hwnd);
|
||||||
|
Loading…
Reference in New Issue
Block a user