Commit [36c757]  Maximize  Restore  History

Fix enter-prox detection

Prior to commit 61f6a7c, the value of oldState.proximity
was not set by wcmUpdateOldState. Rather, when a tool
entered proximity, the proximity flag would be explicitly
set only after the call to wcmSend(Non)PadEvents was
complete. This ensured that the condition where the pen
has just entered prox would be properly detected.

Since the aforementioned commit copies the value of ds
(whose proximity flag is set) to oldState, issues related
to the enter-prox condition have appeared. This is most
noticable in GIMP, which has trouble switching tools.

To resolve this issue, we remove the explicit setting of
oldState.proximity (which is now implicitly handled by
the call to wcmUpdateOldState after wcmSend(Non)PadEvents
finishes) and add in an explicit clearing of the same
prior to the call. In this way, it acts the same as
oldState.buttons which must also be cleared upon entering
prox to properly detect presses.

Signed-off-by: Jason Gerecke <>
Reviewed-by: Ping Cheng <>

Jason Gerecke Jason Gerecke 2014-05-23

changed src/wcmCommon.c
src/wcmCommon.c Diff Switch to side-by-side view

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks