summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-04-22 22:05:44 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-04-22 22:05:44 (GMT)
commitbcc1d86678bcd77495a02ca7b58041f6c9ff3d1a (patch)
tree2a15c9c515b47019cd45cebbd1f7d1495db6f87e /generic
parent72dea207ae279d05cfa07445b767e0efb4bb6702 (diff)
parenta0029792b685e19df1d79a8170579d88416055b0 (diff)
downloadtk-bcc1d86678bcd77495a02ca7b58041f6c9ff3d1a.zip
tk-bcc1d86678bcd77495a02ca7b58041f6c9ff3d1a.tar.gz
tk-bcc1d86678bcd77495a02ca7b58041f6c9ff3d1a.tar.bz2
[Bug 3520202]: %K must not work with <MouseWheel> or effects are undefined!
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 11b2122..abdee59 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2383,7 +2383,7 @@ ExpandPercents(
string = numStorage;
goto doString;
case 'k':
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) {
number = eventPtr->xkey.keycode;
goto doNumber;
}
@@ -2523,7 +2523,7 @@ ExpandPercents(
* This is used only by the MouseWheel event.
*/
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type == MouseWheelEvent)) {
number = eventPtr->xkey.keycode;
goto doNumber;
}
@@ -2532,7 +2532,7 @@ ExpandPercents(
number = (int) eventPtr->xany.send_event;
goto doNumber;
case 'K':
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) {
char *name = TkKeysymToString(keySym);
if (name != NULL) {
@@ -2541,7 +2541,7 @@ ExpandPercents(
}
goto doString;
case 'N':
- if (flags & KEY) {
+ if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) {
number = (int) keySym;
goto doNumber;
}