aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 3acf2b5e8..7370a0bcf 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -872,8 +872,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);