diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2012-04-22 22:03:10 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2012-04-22 22:03:10 (GMT) |
commit | 92e73dc072f318a1b5a2d2ffe65962dd93b0908d (patch) | |
tree | 55e1cdc16274037a80a6c3cce95cf2c323a5fdb7 /generic | |
parent | a2ff6197200d4070abc990f1aad8f468f35c0f99 (diff) | |
download | tk-92e73dc072f318a1b5a2d2ffe65962dd93b0908d.zip tk-92e73dc072f318a1b5a2d2ffe65962dd93b0908d.tar.gz tk-92e73dc072f318a1b5a2d2ffe65962dd93b0908d.tar.bz2 |
[Bug 3520202]: %K must not work with <MouseWheel> or effects are undefined!
Diffstat (limited to 'generic')
-rw-r--r--[-rwxr-xr-x] | generic/tkBind.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 3f05ccc..7e8d823 100755..100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -2428,7 +2428,7 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr) string = numStorage; goto doString; case 'k': - if (flags & KEY) { + if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) { number = eventPtr->xkey.keycode; goto doNumber; } @@ -2567,7 +2567,7 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr) /* * This is used only by the MouseWheel event. */ - if (flags & KEY) { + if ((flags & KEY) && (eventPtr->type == MouseWheelEvent)) { number = eventPtr->xkey.keycode; goto doNumber; } @@ -2576,7 +2576,7 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr) number = (int) eventPtr->xany.send_event; goto doNumber; case 'K': - if (flags & KEY) { + if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) { char *name; name = TkKeysymToString(keySym); @@ -2586,7 +2586,7 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr) } goto doString; case 'N': - if (flags & KEY) { + if ((flags & KEY) && (eventPtr->type != MouseWheelEvent)) { number = (int) keySym; goto doNumber; } |