Disable tablet flicks on MS Windows by default?

I’m in the middle of porting a very large legacy code base from MS Windows to Linux.
After looking at the alternatives, I chose SDL as my cross-platform window manager.

As I go, I’ve noticed SDL handles a lot of MS Windows quirks the way we do, e.g. disabling the automatic translation of touch events into mouse events. But one thing SDL isn’t doing is disabling tablet “gestures”, such as flicks. Leaving these enabled creates the risk of user touch-interaction getting consumed or delayed, which is why I disabled them in the first place.

I was able to do so in my code by overriding the window-procedure function assigned by SDL_CreateWindow(), using logic nearly identical to what’s seen for data->wndproc in SDL_windowswindow.c .

May I suggest including something like this in your WIN_WindowProc() function:

	// See https://msdn.microsoft.com/en-us/library/windows/desktop/bb969148(v=vs.85).aspx .
	// If we're handling our own touches, we don't want any gestures.
	// Not all of these settings are documented.
	// The use of the undocumented ones was suggested by https://github.com/bjarkeck/GCGJ/blob/master/Monogame/Windows/WinFormsGameForm.cs .
	return TABLET_DISABLE_PRESSANDHOLD |	//  disables press and hold (right-click) gesture
		TABLET_DISABLE_PENTAPFEEDBACK |		//  disables UI feedback on pen up (waves)
		TABLET_DISABLE_PENBARRELFEEDBACK |	//  disables UI feedback on pen button down (circle)
		TABLET_DISABLE_FLICKS |				//  disables pen flicks (back, forward, drag down, drag up)

Hi ulatekh!
You can create pull request with your changes here: GitHub - libsdl-org/SDL: Simple Directmedia Layer
It will be reviewed and merged by SDL authors.

I can make a pull request…but first, I wanted to get an idea of why this hadn’t been done before, if there were any objections to doing it, if maybe it should be subject to SDL_SetHint(), etc.

There’s no reason not to do this when touch events are enabled.

Pull request filed here.