Skip to content

Commit 72508eb

Browse files
committedOct 8, 2012
Fix prerequisite check in wcmUpdateSerial
The prerequisite check in wcmUpdateSerial is incorrect. If the tool ID changes, the property reflecting it will not be updated unless/until the serial number also changes. The check is updated to reflect this. Additionally, the prerequesite check at one of its callsites is removed since the function performs the same check internally. https://bugs.freedesktop.org/show_bug.cgi?id=45237 Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com>
1 parent 3e9be03 commit 72508eb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
 

‎src/wcmCommon.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const WacomDeviceState* ds)
694694
return;
695695
}
696696

697-
if (priv->cur_serial != serial || priv->cur_device_id != id)
698-
wcmUpdateSerial(pInfo, serial, id);
697+
wcmUpdateSerial(pInfo, serial, id);
699698

700699
/* don't move the cursor when going out-prox */
701700
if (!ds->proximity)

‎src/wcmXCommand.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ wcmUpdateSerial(InputInfoPtr pInfo, unsigned int serial, int id)
925925
{
926926
WacomDevicePtr priv = pInfo->private;
927927

928-
if (priv->cur_serial == serial)
928+
if (priv->cur_serial == serial && priv->cur_device_id == id)
929929
return;
930930

931931
priv->cur_serial = serial;

0 commit comments

Comments
 (0)