View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001638 | OpenMPT | User Interface | public | 2022-11-21 18:21 | 2023-08-27 15:05 |
Reporter | c0d3h4x0r | Assigned To | Saga Musix | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 10 |
Product Version | OpenMPT 1.30.08.00 / libopenmpt 0.6.6 (upgrade first) | ||||
Target Version | OpenMPT 1.31.04.00 / libopenmpt 0.7.3 (upgrade first) | Fixed in Version | OpenMPT 1.31.04.00 / libopenmpt 0.7.3 (upgrade first) | ||
Summary | 0001638: Laptop precision touchpad 2-finger scrolling: slow/fine scrolling does nothing in pattern editor | ||||
Description | 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 |
| ||||
Additional Information | EXPECTED: slow 2-finger scrolling should work ACTUAL: slow 2-finger scrolling does nothing | ||||
Tags | No tags attached. | ||||
Has the bug occurred in previous versions? | don't know | ||||
Tested code revision (in case you know it) | |||||
I don't think |
|
Thanks. I'll look into it. I may be able to come up with something. |
|
I have a working fix. I'll create a pull request on GitHub. |
|
PR created: https://github.com/OpenMPT/openmpt/pull/15 |
|
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 |
|
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.
I'll get to work on a revised fix. |
|
Pull request updated. Please review. |
|
I tested the updated code now, and it breaks the intended horizontal scroll behaviour (direction is inverted and one mouse wheel notch jumps by two channels instead of one - probably because the truncation now happens in a different place). Globals.cpp.patch (1,290 bytes)
Index: Globals.cpp =================================================================== --- Globals.cpp (revision 18395) +++ Globals.cpp (working copy) @@ -647,23 +647,32 @@ } +static short RoundMouseWheelToWholeStep(int value) +{ + if(value > 0) + return mpt::saturate_cast<short>(mpt::align_up(value, WHEEL_DELTA)); + else + return mpt::saturate_cast<short>(-mpt::align_up(-value, WHEEL_DELTA)); +} + + BOOL CModScrollView::OnMouseWheel(UINT fFlags, short zDelta, CPoint point) { // we don't handle anything but scrolling just now - if (fFlags & (MK_SHIFT | MK_CONTROL)) return FALSE; + if(fFlags & (MK_SHIFT | MK_CONTROL)) + return FALSE; - //if the parent is a splitter, it will handle the message - //if (GetParentSplitter(this, TRUE)) return FALSE; - // we can't get out of it--perform the scroll ourselves - return DoMouseWheel(fFlags, zDelta, point); + return DoMouseWheel(fFlags, RoundMouseWheelToWholeStep(zDelta), point); } void CModScrollView::OnMouseHWheel(UINT fFlags, short zDelta, CPoint point) { + zDelta = RoundMouseWheelToWholeStep(zDelta); + // we don't handle anything but scrolling just now - if (fFlags & (MK_SHIFT | MK_CONTROL)) + if(fFlags & (MK_SHIFT | MK_CONTROL)) { CScrollView::OnMouseHWheel(fFlags, zDelta, point); return; |
|
Sorry for the delayed response. Between holiday travels, a 2 week bout of COVID, layoffs and reorgs at my employer, and my personal PCs all getting jacked up by upgrading them to Windows 11, I've been pretty busy dealing with other things. Yes, I'll give your patch a try soon and report back. |
|
Did you get a chance to try my patch yet? |
|
Sorry, not yet. I've had a lot going on lately. It's still on my radar though. |
|
I had to replace my laptop and now I have access to a precision touchpad. I can see that my patch fixes the issue but now scrolling is a bit too fast / sensitive. I'll investigate a bit more. |
|
r19442 should work better, can you check? |
|
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 1.30.07.00 / libopenmpt 0.6.6 (upgrade first) => OpenMPT 1.30.08.00 / libopenmpt 0.6.6 (upgrade first) |
2022-11-21 18:33 | Saga Musix | Summary | [1.30.08.00 (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 | |
2023-01-02 14:54 | Saga Musix | Note Added: 0005446 | |
2023-01-02 14:54 | Saga Musix | File Added: Globals.cpp.patch | |
2023-01-23 21:08 | c0d3h4x0r | Note Added: 0005497 | |
2023-04-04 21:59 | Saga Musix | Note Added: 0005649 | |
2023-04-04 23:58 | c0d3h4x0r | Note Added: 0005650 | |
2023-06-30 21:18 | Saga Musix | Note Added: 0005748 | |
2023-06-30 21:50 | Saga Musix | Note Added: 0005749 | |
2023-06-30 21:50 | Saga Musix | Assigned To | => Saga Musix |
2023-06-30 21:50 | Saga Musix | Status | new => feedback |
2023-06-30 21:50 | Saga Musix | Target Version | => OpenMPT 1.31.04.00 / libopenmpt 0.7.3 (upgrade first) |
2023-08-27 15:05 | Saga Musix | Status | feedback => resolved |
2023-08-27 15:05 | Saga Musix | Resolution | open => fixed |
2023-08-27 15:05 | Saga Musix | Fixed in Version | => OpenMPT 1.31.04.00 / libopenmpt 0.7.3 (upgrade first) |