summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-24 14:55:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-24 14:55:51 (GMT)
commit5c07a1409bb742e9fe41e7e523146ce75d71580a (patch)
treeaab10bdd3828b1a6b4ea3e656a157b0403661f8d /generic
parent89d0c9df2c0159f34bdb8080abef85a21fe9c0bb (diff)
downloadtk-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.c2
-rw-r--r--generic/tkEvent.c2
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;