diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-24 14:55:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-24 14:55:51 (GMT) |
commit | 5c07a1409bb742e9fe41e7e523146ce75d71580a (patch) | |
tree | aab10bdd3828b1a6b4ea3e656a157b0403661f8d /generic | |
parent | 89d0c9df2c0159f34bdb8080abef85a21fe9c0bb (diff) | |
download | tk-5c07a1409bb742e9fe41e7e523146ce75d71580a.zip tk-5c07a1409bb742e9fe41e7e523146ce75d71580a.tar.gz tk-5c07a1409bb742e9fe41e7e523146ce75d71580a.tar.bz2 |
A few more minor adaptations, and make it compile on X11 (XKeyEvent structure doesn't have a nbytes field).
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 2 | ||||
-rw-r--r-- | generic/tkEvent.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 3d5bb3e..0208a7a 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -1987,7 +1987,7 @@ ExpandPercents( case 'b': if (flags & BUTTON) { number = eventPtr->xbutton.button; - if (eventPtr->xbutton.button >= Button8) { + if (number >= Button8) { number += (Button4 - Button8); } goto doNumber; diff --git a/generic/tkEvent.c b/generic/tkEvent.c index a8eaec1..e94cdd5 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -590,7 +590,9 @@ UpdateButtonEventState( */ eventPtr->type = MouseWheelEvent; eventPtr->xany.send_event = -1; +#if defined(_WIN32) || defined(MAC_OSX_TK) eventPtr->xkey.nbytes = 0; +#endif eventPtr->xkey.keycode = (eventPtr->xbutton.button & 1) ? 1 : -1; if (eventPtr->xkey.keycode > Button5) { eventPtr->xkey.state |= ShiftMask; |