summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit@noemail.net>2004-02-16 23:09:23 (GMT)
committerwolfsuit <wolfsuit@noemail.net>2004-02-16 23:09:23 (GMT)
commit11995c39ac8db8f3c9531c929ff64a7437941a31 (patch)
tree69f58a89b8fb407fc269b837af99f9d81fed77ca /generic
parentec54861ba969c9a343d9fc7aa79477889dad1cb8 (diff)
downloadtk-11995c39ac8db8f3c9531c929ff64a7437941a31.zip
tk-11995c39ac8db8f3c9531c929ff64a7437941a31.tar.gz
tk-11995c39ac8db8f3c9531c929ff64a7437941a31.tar.bz2
This gets the scroll wheel working for listboxes and text widgets for Mac OS
X. It also changes the model to route scrollwheel events to the window under the pointer, not the focus window on X (and only on X). That is the correct behavior for Mac OS X. FossilOrigin-Name: 0b99b409b4ea86f14f5e3377309ac939f3ba6464
Diffstat (limited to 'generic')
-rw-r--r--generic/tkEvent.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index f3b61d6..117f873 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -11,7 +11,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.17.2.1 2003/07/19 01:03:25 hobbs Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.17.2.2 2004/02/16 23:09:25 wolfsuit Exp $
*/
#include "tkPort.h"
@@ -838,7 +838,12 @@ Tk_HandleEvent(eventPtr)
* available on the Windows version of Tk.
*/
+#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
winPtr->dispPtr->lastEventTime = eventPtr->xkey.time;
winPtr = TkFocusKeyEvent(winPtr, eventPtr);
if (winPtr == NULL) {