Touch delay issue on Windows 7


#1

Hi all! I’ve got quite a head-scratcher with some touch-related things on Windows 7. I’ve noticed that touch down events have a bit of a lag before firing, or alternatively will fire once you touch down and start moving. This issue isn’t present with Windows 8 or 10 – the same application with the same version of Cinder (0.9.2dev) works fine on those platforms. Unsurprisingly, this makes displaying a “touched state” for various UI assets problematic, as a normal touch-and-release is too fast and won’t show the touched state. Holding for a moment will, but that’s very unnatural.

I got excited when I saw the same exact issue mentioned on the old forum, and a link to the same issue and a fix on the OF forum. However, that didn’t help and I’ve since realized that RegisterTouchWindow() (via settings->setMultiTouchEnabled(true)) was already being called in my app anyway.

https://forum.libcinder.org/topic/how-to-shorten-the-delay-before-mouse-down-event-after-touch

I’ve gone through all of the Pen, Touch, Tablet PC, etc. settings I can find and disabled all sorts of gestures, flicks, inking, etc. and it has’t solved the problem entirely, though it did help a bit. I was beginning to fear that this may just be something unsolvable on Win 7, but I noticed that touches in Chrome work as expected without the delay (verified by using a JavaScript touchstart demo so I can see when it’s recognized).

Sidenote: Chrome also hides that little diamond cursor which I can not figure out how to disable – if you have any tips on that as well please share. I did find an article on removing the blue “expanding circle” animation after you touch though which was another thing on my list to get rid of:
https://social.technet.microsoft.com/Forums/ie/en-US/5518cd6f-a067-488a-a46b-a1cb91f82af6/how-to-disable-windows-7-touch-cursor?forum=w7itproui

Anyway, please share any info you may have here! Thanks!

Matt


#2

To get rid of the diamond icon, go to the “Pen and touch” control panel and disable the visual feedback (I’m on a Dutch system, so I don’t know the exact wording in English).

You may also find additional options in the Local Group Policy Editor, under “User Configuration” > “Administrative Templates”.


#3

Great news everybody! I figured it out!

As it turns out, palm rejection is enabled by default, and this causes a delay in the touch down/start event as the OS tries to ensure it’s not a touch that should be rejected. This can be disabled by passing the TWF_WANTPALM when registering for touches like so: (*RegisterTouchWindow)( mWnd, TWF_WANTPALM );

I’m not sure if this is a change that should happen in Cinder, or if the setup flags should be exposed to the developer somehow. I currently have access to machines running Windows 7, 8 (or 8.1?) and 10 along with a touchscreen, so I’m happy to do any testing to help figure that out.

Also, @paul.houx, I looked in the Pen & Touch settings but didn’t see anything about visual feedback. Are you able to post a screenshot so I can look for the equivalent? Thanks!

Cinder’s Windows touch registration is here:

Full docs are here:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd317326(v=vs.85).aspx?f=255&MSPPError=-2147217396


#4

The visual feedback option is in Settings > Ease of Access > Other Options, at least in Windows 10.

What Javascript demo did you use to check the delay? I didn’t notice it on my Cinder app but it’d be good to compare.


#5

Hey Adria! I used this demo, which was the first result when searching google for “javascript touchstart demo”:
http://www.javascriptkit.com/javatutors/touchevents.shtml

There’s no Other Options in Ease of Access on Windows 7, but I will persevere! I figured out the palm rejection thing by looking at Chrome’s source code, so maybe I’ll find another “gem” about the diamond cursor (gemstone pun!) in there as well.


#6

Hi Matt,

unfortunately I don’t have touch input on my system, so I can’t see the settings. I took my advice from a installation maintenance manual I wrote last year.

With the same caveat, you could also try to open the “Edit Group Policy” panel (use Windows+R to search for it), then under “User Configuration” > “Administrative Templates” > “Windows Components” > “Tablet PC” > “Cursors”, you will find the “Turn off pen feedback” option. Double-click it and set it to “Enabled”. Hopefully that works. If not, you should probably set it to “Not Configured” again.


#7

Not sure if this is related, but I’m getting horrible touch performance on windows 10. When testing the touchscreen in its little calibration app the lag is totally reasonable. When running inside cinder though, the touches seem to update at about 5fps, while the application itself maintains a full 60fps (according to app::getAverageFps() anyway, but the screen is clearly not updating at that rate). As soon as i release my finger the animation returns to full speed, but the value reported by getAverageFps doesn’t change. Anyone seen anything like this? I can post a video if it helps.


#8

I haven’t seen this happen with touches, but I have seen similar issues with moving my mouse cursor on top of a Cinder app window (fullscreens or not, didn’t matter) on my MBP. The frame rate would just dip to ~10fps, even in a blank app. I was never able to get to the bottom of it and never had that type of issue on production hardware.