diff options
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/events.c b/dix/events.c index 52f8b0d4d..91a083364 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4221,8 +4221,8 @@ DeviceEnterLeaveEvent( (mode == XINotifyPassiveUngrab && type == XI_Enter)) return; - btlen = (mouse->button) ? (mouse->button->numButtons + 7)/8 : 0; - btlen = (btlen + 3)/4; + btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; + btlen = bytes_to_int32(btlen); len = sizeof(xXIEnterEvent) + btlen * 4; event = xcalloc(1, len); |