mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-10 07:38:06 -05:00
Patch from Hideki Eiraku to make PuTTY call GetScrollInfo, so it can
use 32-bit scrollbar position data instead of being limited to the 16-bit version that comes in scrollbar messages' wParam. [originally from svn r9720]
This commit is contained in:
parent
3e22c99c9a
commit
c3df7b9b15
@ -2994,7 +2994,19 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
break;
|
||||
case SB_THUMBPOSITION:
|
||||
case SB_THUMBTRACK:
|
||||
term_scroll(term, 1, HIWORD(wParam));
|
||||
/*
|
||||
* Use GetScrollInfo instead of HIWORD(wParam) to get
|
||||
* 32-bit scroll position.
|
||||
*/
|
||||
{
|
||||
SCROLLINFO si;
|
||||
|
||||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_TRACKPOS;
|
||||
if (GetScrollInfo(hwnd, SB_VERT, &si) == 0)
|
||||
si.nTrackPos = HIWORD(wParam);
|
||||
term_scroll(term, 1, si.nTrackPos);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user