|
|
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR Pending]
Link: https://www.fltk.org/str.php?L3521
Version: 1.4-feature
FWIW, here's my take on this issue. According to MS docs the MK_SHIFT bit
is set if Shift is pressed during the event. I'm using this to invert the
wParam value of the WM_MOUSEHWHEEL event which is also executed in the
FALLTHROUGH case (WM_MOUSEWHEEL with Shift):
// FALLTHROUGH
case WM_MOUSEHWHEEL: {
static int delta = 0; // running total of all motion
// ** new code starts below
int wparam = (SHORT)(HIWORD(wParam));
if (LOWORD(wParam) & MK_SHIFT)
wparam = -wparam;
delta += wparam;
// ** new code ends above
Fl::e_dy = 0;
Fl::e_dx = delta / WHEEL_DELTA;
delta -= Fl::e_dx * WHEEL_DELTA;
if (Fl::e_dx)
Fl::handle(FL_MOUSEWHEEL, window);
return 0;
}
This patch, however, has the side effect that it would also invert the
scroll /direction/ of real horizontal mousewhee levents (WM_MOUSEHWHEEL).
It works, but I'm not entirely satisfied with this approach. Maybe we need
a longer but more explicit patch. Ideas?
Link: https://www.fltk.org/str.php?L3521
Version: 1.4-feature
[ Direct Link to Message ] | |
|
| |