SDL/src/video/wayland
Sam Lantinga a4cfa93670 Fixed bug 2293 - Precise scrolling events
Martijn Courteaux

I implemented precise scrolling events. I have been through all the folders in /src/video/[platform] to implement where possible. This works on OS X, but I can't speak for others. Build farm will figure that out, I guess. I think this patch should introduce precise scrolling on OS X, Wayland, Mir, Windows, Android, Nacl, Windows RT.

The way I provide precise scrolling events is by adding two float fields to the SDL_MouseWheelScrollEvent datastructure, called "preciseX" and "preciseY". The old integer fields "x" and "y" are still present. The idea is that every platform specific code normalises the scroll amounts and forwards them to the SDL_SendMouseWheel function. It is this function that will now accumulate these (using a static variable, as I have seen how it was implemented in the Windows specific code) and once we hit a unit size, set the traditional integer "x" and "y" fields.

I believe this is pretty solid way of doing it, although I'm not the expert here.

There is also a fix in the patch for a typo recently introduced, that might need to be taken away by the time anybody merges this in. There is also a file in Nacl which I have stripped a horrible amount of trailing whitespaces. (Leave that part out if you want).
2017-08-14 21:28:04 -07:00
..
SDL_waylandclipboard.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandclipboard.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylanddatamanager.c Fixed bug 2330 - Debian bug report: SDL2 X11 driver buffer overflow with large X11 file descriptor 2017-08-14 20:22:19 -07:00
SDL_waylanddatamanager.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylanddyn.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylanddyn.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandevents.c Fixed bug 2293 - Precise scrolling events 2017-08-14 21:28:04 -07:00
SDL_waylandevents_c.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandmouse.c Removed redundant mouse clean up on quit for some platforms. 2017-05-19 23:30:59 +02:00
SDL_waylandmouse.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandopengles.c Fixed bug 3690 - SDL2 KMS/DRM render context support 2017-08-02 10:22:48 -07:00
SDL_waylandopengles.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandsym.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandtouch.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandtouch.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandvideo.c wayland: Fixed freeing memory of SDL_malloc() with plain free(). 2017-05-25 23:00:58 +02:00
SDL_waylandvideo.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_waylandwindow.c Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks 2017-08-14 06:28:21 -07:00
SDL_waylandwindow.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00