Cursor (puck) tools tend to be left on the sensor, preventing us from being able to rely solely on proximity information to determine if they are being actively used. In the past we've used the amount of time since the last event as an indicator of activity and allowed other devices to grab control of the pointer if more than 100 milliseconds had elapsed since the cursor's last event. Although this seems to work well, there is another indicator of activity which should not be ignored: button state. If a user is pressing a button on their cursor tool, it should be considered active even if the 100ms timeout has been exceeded. Not doing so could potentially allow another tool to grab "active" status and have our driver send a button-up message and stop an in- progress drag.
Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> --- src/wcmCommon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 28e5488..4fbe775 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -865,7 +865,7 @@ static Bool check_arbitrated_control(InputInfoPtr pInfo, WacomDeviceStatePtr ds) /* Cursor devices are often left idle in range, so allow touch to * grab control if the tool has not been used for some time. */ - return (ds->time - active->oldState.time > 100); + return (ds->time - active->oldState.time > 100) && !active->oldState.buttons; } else if (IsTouch(active) && IsCursor(priv)) { /* An otherwise idle cursor may still occasionally jitter and send -- 2.10.1 ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel