aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xorg-server/xkb/xkbActions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index c9649115e..a40e2ae79 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -958,15 +958,15 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
DeviceIntPtr dev;
int button;
+ if (xkbi->device == inputInfo.keyboard)
+ return 0;
+
if (filter->keycode==0) { /* initial press */
_XkbLookupButtonDevice(&dev, pAction->devbtn.device, serverClient,
DixUnknownAccess, &button);
if (!dev || !dev->public.on)
return 1;
- if (xkbi->device == inputInfo.keyboard)
- return 0;
-
button= pAction->devbtn.button;
if ((button<1)||(button>dev->button->numButtons))
return 1;