summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-22 06:42:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-22 06:42:45 (GMT)
commit6dec4cb93e97fd84d1591cec71883c42abf1bbbb (patch)
tree16fa98d1a2eb253e17e2abbf56cdc1de39b97eab /generic/tkEvent.c
parent2d7db39df89bdae1d575bbbf3bfad5dc6f4b818c (diff)
parent6a5d401c8ab95a3cf1033c389fbe4aba81947f70 (diff)
downloadtk-6dec4cb93e97fd84d1591cec71883c42abf1bbbb.zip
tk-6dec4cb93e97fd84d1591cec71883c42abf1bbbb.tar.gz
tk-6dec4cb93e97fd84d1591cec71883c42abf1bbbb.tar.bz2
Fix [5da1d76e01]: X11: add default bindings for non-emulated horizontal scrolling to Tk 8.6
Diffstat (limited to 'generic/tkEvent.c')
-rw-r--r--generic/tkEvent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 56b32af..276f519 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -1209,6 +1209,14 @@ Tk_HandleEvent(
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+#if !defined(MAC_OSX_TK) && !defined(_WIN32)
+ if (((eventPtr->type == ButtonPress) || (eventPtr->type == ButtonRelease))
+ && ((eventPtr->xbutton.button - 6) < 2)) {
+ eventPtr->xbutton.button -= 2;
+ eventPtr->xbutton.state ^= ShiftMask;
+ }
+#endif
+
UpdateButtonEventState(eventPtr);
/*