diff options
author | wolfsuit <wolfsuit@noemail.net> | 2005-06-03 19:03:22 (GMT) |
---|---|---|
committer | wolfsuit <wolfsuit@noemail.net> | 2005-06-03 19:03:22 (GMT) |
commit | 6a463a74fefa4166a9b339e6c9ccdc03bfd3795f (patch) | |
tree | ee77cfda91c6451fa57699f509cc04b5d40910d5 /generic/tkEvent.c | |
parent | 1077c6b4ac7d2758ec1a24934818333201dc30b8 (diff) | |
download | tk-6a463a74fefa4166a9b339e6c9ccdc03bfd3795f.zip tk-6a463a74fefa4166a9b339e6c9ccdc03bfd3795f.tar.gz tk-6a463a74fefa4166a9b339e6c9ccdc03bfd3795f.tar.bz2 |
On Mac OS X scrollwheel events are sent to the window under the mouse, not
to the focus window.
FossilOrigin-Name: 73cfb2c8e64d8e4478fdd08c2f2f10042cc11943
Diffstat (limited to 'generic/tkEvent.c')
-rw-r--r-- | generic/tkEvent.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c index adad3ed..388fa49 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.27 2005/03/14 01:59:04 dkf Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.28 2005/06/03 19:03:23 wolfsuit Exp $ */ #include "tkPort.h" @@ -265,11 +265,16 @@ InvokeFocusHandlers(winPtrPtr, mask, eventPtr) return 1; } - if (mask & (KeyPressMask|KeyReleaseMask|MouseWheelMask)) { +#ifdef MAC_OSX_TK + /* MouseWheel events are not focus specific on Mac OS X */ + if (mask & (KeyPressMask|KeyReleaseMask)) { +#else + if (mask & (KeyPressMask|KeyReleaseMask|MouseWheelMask)) { +#endif (*winPtrPtr)->dispPtr->lastEventTime = eventPtr->xkey.time; *winPtrPtr = TkFocusKeyEvent(*winPtrPtr, eventPtr); if (*winPtrPtr == NULL) { - return 1; + return 1; } } |