summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xi/exevents.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index d57265ede..8615fd456 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -870,8 +870,10 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
continue;
if (!sd->button)
continue;
- if (button_is_down(sd, key, BUTTON_PROCESSED))
- return DONT_PROCESS;
+ for (i = 1; i <= sd->button->numButtons; i++)
+ if (sd->button->map[i] == key &&
+ button_is_down(sd, i, BUTTON_PROCESSED))
+ return DONT_PROCESS;
}
}
set_button_up(device, key, BUTTON_PROCESSED);