summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r--win/tkWinX.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 656e142..c61601b 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -1165,7 +1165,7 @@ GenerateXEvent(
event.key.nbytes = 0;
event.x.xkey.state = state;
event.x.xany.serial = scrollCounter++;
- event.x.xkey.keycode = (unsigned int) delta;
+ event.x.xkey.keycode = (unsigned int) (delta & 0xffff);
} else {
event.x.type = MouseWheelEvent;
event.x.xany.send_event = -1;