|
|
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
I tried to process wheel+shift events as equivalent
to horizontal movements by doing this starting at
line #1973 of file src/Fl_x.cxx :
case ButtonPress:
Fl::e_keysym = FL_Button + xevent.xbutton.button;
set_event_xy(window);
Fl::e_dx = Fl::e_dy = 0;
if (xevent.xbutton.button == Button4) {
Fl::e_dy = -1; // Up
event = FL_MOUSEWHEEL;
} else if (xevent.xbutton.button == Button5) {
Fl::e_dy = +1; // Down
event = FL_MOUSEWHEEL;
} else if (xevent.xbutton.button == 6 || (xevent.xbutton.button ==
Button4 && xevent.xbutton.state & ShiftMask)) {
Fl::e_dx = -1; // Left
event = FL_MOUSEWHEEL;
} else if (xevent.xbutton.button == 7 || (xevent.xbutton.button ==
Button5 && xevent.xbutton.state & ShiftMask)) {
Fl::e_dx = +1; // Right
event = FL_MOUSEWHEEL;
} else {
Fl::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
event = FL_PUSH;
checkdouble();
}
But, on my setup which is Ubuntu within Virtualbox on macOS,
something swallows altogether events when the mouse wheel
is moved AND shift is pressed: function fl_handle(const XEvent& )
doesn't even run. That is possibly caused by VirtualBox on macOS
since you report that shift+wheel with the patched Fl_Scrollbar.cxx
does activate the horizontal scroll with VirtualBox on windows.
Link: https://www.fltk.org/str.php?L3521
Version: 1.4-feature
[ Direct Link to Message ] | |
|
| |