summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit>2005-06-03 19:03:22 (GMT)
committerwolfsuit <wolfsuit>2005-06-03 19:03:22 (GMT)
commitf95b53973eee5e9a4db55dd31091598297a449b6 (patch)
treeee77cfda91c6451fa57699f509cc04b5d40910d5
parentb47015e039bd872d4575c1493788ba4d5d675f83 (diff)
downloadtk-f95b53973eee5e9a4db55dd31091598297a449b6.zip
tk-f95b53973eee5e9a4db55dd31091598297a449b6.tar.gz
tk-f95b53973eee5e9a4db55dd31091598297a449b6.tar.bz2
On Mac OS X scrollwheel events are sent to the window under the mouse, not
to the focus window.
-rw-r--r--ChangeLog20
-rw-r--r--generic/tkEvent.c11
2 files changed, 20 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index f968337..d5c7dbc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,17 @@
2005-06-02 Jim Ingham <jingham@apple.com>
- Another patch from M. Kirkham.
-
- * macosx/tkMacOSXScrlbr.c (ThumbActionProc, ScrollBarBindProc):
- Record the first mouse down point, and compute differences from
- that, rather than getting the mouse down each time through the
- loop. The old method would get fooled if you moved the mouse less
- than a text line height in the text widget.
- [Bug 1083728]
+ * generic/tkEvent.c (InvokeFocusHandlers): On Mac OS X the
+ scrollwheel events are sent to the window under the mouse,
+ not to the focus window.
+
+ Another patch from M. Kirkham.
+
+ * macosx/tkMacOSXScrlbr.c (ThumbActionProc, ScrollBarBindProc):
+ Record the first mouse down point, and compute differences from
+ that, rather than getting the mouse down each time through the
+ loop. The old method would get fooled if you moved the mouse less
+ than a text line height in the text widget.
+ [Bug 1083728]
2005-06-03 Daniel Steffen <das@users.sourceforge.net>
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;
}
}