View Issue Details

IDProjectCategoryView StatusLast Update
0001638OpenMPTUser Interfacepublic2022-12-04 03:25
Reporterc0d3h4x0r Assigned To 
Status newResolutionopen 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT / libopenmpt 0.6.6 (current stable) 
Summary0001638: Laptop precision touchpad 2-finger scrolling: slow/fine scrolling does nothing in pattern editor

My laptop is an MSI GS65 Stealth Thin 8RF. It has a Synaptics touchpad that Windows 10 x64 recognizes as a "Precision TouchPad". I have two-finger vertical scrolling enabled. Fine/slow vertical scrolling works fine in other apps (such as Google Chrome or Notepad). But in OpenMPT's pattern editor, fine/slow vertical scrolling doesn't work. The pattern editor only scrolls if I slide my two fingers rapidly enough up/down the touchpad surface.

Steps To Reproduce
  1. Launch OpenMPT
  2. New song
  3. Go to pattern editor
  4. Resize main window so pattern editor doesn't fit within window height.
  5. Place cursor inside pattern editor
  6. Use 2-finger scrolling on touchpad
Additional Information

EXPECTED: slow 2-finger scrolling should work

ACTUAL: slow 2-finger scrolling does nothing

TagsNo tags attached.
Has the bug occurred in previous versions?don't know
Tested code revision (in case you know it)


Saga Musix

Saga Musix

2022-11-21 18:28

administrator   ~0005378

Last edited: 2022-11-21 18:30

I don't think CScrollView::DoMouseWheel can handle scroll sizes less than one line. I think that was also an issue with the scroll messages created by touch gestures, in which case explicitly implementing touch support fixed the issue but WM_MOUSEWHEEL message with smaller scroll amounts will remain problematic.



2022-11-21 20:00

reporter   ~0005379

Thanks. I'll look into it. I may be able to come up with something.



2022-11-22 08:51

reporter   ~0005389

I have a working fix. I'll create a pull request on GitHub.



2022-11-22 09:24

reporter   ~0005390

PR created:

Saga Musix

Saga Musix

2022-12-02 20:09

administrator   ~0005400

The code looks sensible, but I suppose this also affects horizontal scrolling (e.g. when there's lots of pattern channels)? Or is the different implementation of CModScrollView::OnMouseHWheel causing that to work? If so, taking the horizontal scrolling code and reusing it for vertical scrolling would be a one-liner fix.



2022-12-03 22:39

reporter   ~0005401

Last edited: 2022-12-04 00:02

I've never seen a mouse device with fine-grained horizontal mouse wheel (just tilt left/right, which are typically binary switches). However, the MFC base class automatically converts vertical mouse wheel rotation into horizontal scrolling when there's no vertical scrollbar, so fine-grained horizontal scrolling via vertical mouse wheel rotation is possible. And yes, it is still broken even with my fix.

CScrollView::DoMouseWheel contains the defect/limitation, but CModScrollView::OnMouseHWheel doesn't use it, so a somewhat different form of my fix is needed here -- especially because horizontal scrolling is only permitted to occur in whole-column increments.

I'll get to work on a revised fix.



2022-12-04 03:25

reporter   ~0005406

Pull request updated. Please review.

Issue History

Date Modified Username Field Change
2022-11-21 18:21 c0d3h4x0r New Issue
2022-11-21 18:28 Saga Musix Note Added: 0005378
2022-11-21 18:30 Saga Musix Note Edited: 0005378
2022-11-21 18:33 Saga Musix Product Version OpenMPT / libopenmpt 0.6.6 (upgrade first) => OpenMPT / libopenmpt 0.6.6 (current stable)
2022-11-21 18:33 Saga Musix Summary [ (missing option)] laptop precision touchpad 2-finger scrolling: slow/fine scrolling does nothing in pattern editor => Laptop precision touchpad 2-finger scrolling: slow/fine scrolling does nothing in pattern editor
2022-11-21 20:00 c0d3h4x0r Note Added: 0005379
2022-11-22 08:51 c0d3h4x0r Note Added: 0005389
2022-11-22 09:24 c0d3h4x0r Note Added: 0005390
2022-12-02 20:09 Saga Musix Note Added: 0005400
2022-12-03 22:39 c0d3h4x0r Note Added: 0005401
2022-12-04 00:02 c0d3h4x0r Note Edited: 0005401
2022-12-04 03:25 c0d3h4x0r Note Added: 0005406