We shouldn't make *any* change to the state if checkonly==true, but
we've been resetting properties anyway. This blocks off the calls
to the reset functions to prevent them from being called if it's
just a drill.

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
 src/wcmXCommand.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index a5b41d2..9d5dd5e 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -545,15 +545,18 @@ static int wcmSetActionsProperty(DeviceIntPtr dev, Atom 
property,
 
                if (subproperty == 0)
                { /* Interpret 'None' as meaning 'reset' */
-                       if (property == prop_btnactions)
-                               wcmResetButtonAction(pInfo, index, size);
-                       else if (property == prop_strip_buttons)
-                               wcmResetStripAction(pInfo, index);
-                       else if (property == prop_wheel_buttons)
-                               wcmResetWheelAction(pInfo, index);
-
-                       if (subproperty != handlers[index])
-                               subproperty = handlers[index];
+                       if (!checkonly)
+                       {
+                               if (property == prop_btnactions)
+                                       wcmResetButtonAction(pInfo, index, 
size);
+                               else if (property == prop_strip_buttons)
+                                       wcmResetStripAction(pInfo, index);
+                               else if (property == prop_wheel_buttons)
+                                       wcmResetWheelAction(pInfo, index);
+
+                               if (subproperty != handlers[index])
+                                       subproperty = handlers[index];
+                       }
                }
                else
                {
-- 
1.8.1.1


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to