The pad should never be arbitrated pointer control since it is not a
pointer controlling device. The `check_arbitrated_control` function
performs its checks in the wrong order, however, and will grant control
if no other device is currently active.

This can cause touch to be disabled for "generic protocol" devices (e.g.
Intuos, Bamboo, etc.) until a pen is used because touch is the lowest-
priority device to be arbitrated access. For protocol 4/5 devices (e.g.
Intuos 5/4/3 and Cintiq) this can also lock out touch, but only if the
ExpressKey was pressed prior to the beginning of the touch, and only
while it remains held.

This patch strengthens the condition that the pad may never be granted
control by making it the first thing checked.

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
 src/wcmCommon.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index b938091..61ac43c 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -850,15 +850,15 @@ static Bool check_arbitrated_control(InputInfoPtr pInfo, 
WacomDeviceStatePtr ds)
        WacomDevicePtr active = WACOM_DRIVER.active;
        WacomDevicePtr priv = pInfo->private;
 
-       if (active == NULL || active->oldState.device_id == ds->device_id) {
-               DBG(11, priv, "Same device ID as active; allowing access.\n");
-               return TRUE;
-       }
-
        if (IsPad(priv)) {
                /* Pad may never be the "active" pointer controller */
                return FALSE;
        }
+
+       if (active == NULL || active->oldState.device_id == ds->device_id) {
+               DBG(11, priv, "Same device ID as active; allowing access.\n");
+               return TRUE;
+       }
        else if (IsCursor(active) && IsTouch(priv)) {
                /* Cursor devices are often left idle in range, so allow touch 
to
                 * grab control if the tool has not been used for some time.
-- 
2.1.0


------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to