wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.77k stars 1.7k forks source link

Scrolling with trackpad in two directions at once doesn't seem to work properly #24516

Open craftyjon opened 2 weeks ago

craftyjon commented 2 weeks ago

Description

When some widget can be scrolled both horizontally and vertically, wxWidgets seems to get "locked in" to accepting only one scroll direction. On macOS hardware with a trackpad input, it is easy to input "diagonal" scrolling, but this doesn't really work in wxWidgets, because one or the other direction (horizontal or vertical) will "win" and so diagonal scrolling of the widget can only be accomplished "Manhattan style".

This doesn't seem to be a limitation of the hardware, as other applications (e.g. HTML Canvas in Firefox/Chrome) can accept simultaneous scroll inputs on two axes.

I am not sure if this is a wxMac-specific problem or not, as the only hardware I have that can give this kind of input is a Macbook.

To Reproduce:

Run the wxGrid sample and try scrolling around with a trackpad that allows scrolling diagonally (i.e. two mousewheel inputs at once)

Compare behavior to, for example, some of the demos at https://konvajs.org/docs/sandbox/Canvas_Scrolling.html

Platform and version information