Skip to content

Commit 3b0de80

Browse files
author
kalibera
committed
Disable mouse wheel scrolling on windows without a scrollbar on Windows
(PR#18461). git-svn-id: https://svn.r-project.org/R/trunk@88361 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent fd3a35d commit 3b0de80

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/extra/graphapp/events.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,10 @@ static long handle_message(HWND hwnd, UINT message,
530530
{
531531
case WM_MOUSEWHEEL: /* convert MOUSEWHEEL messages to VSCROLL. Scroll by pairs of lines */
532532
upDown = (short)HIWORD(wParam) > 0 ? SB_LINEUP : SB_LINEDOWN;
533-
PostMessage(hwnd, WM_VSCROLL, upDown, 0);
534-
PostMessage(hwnd, WM_VSCROLL, upDown, 0);
533+
if (GetWindowLong(hwnd, GWL_STYLE) & WS_VSCROLL) {
534+
PostMessage(hwnd, WM_VSCROLL, upDown, 0);
535+
PostMessage(hwnd, WM_VSCROLL, upDown, 0);
536+
}
535537
break;
536538

537539
case WM_SYSKEYDOWN:

0 commit comments

Comments
 (0)