summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.c
diff options
context:
space:
mode:
authorrjohnson <rjohnson@noemail.net>1998-10-10 00:30:33 (GMT)
committerrjohnson <rjohnson@noemail.net>1998-10-10 00:30:33 (GMT)
commit5b1c3804285a3e0374833c472e26ba0cf808b705 (patch)
tree5d1b6c4f80c96cbc9337259a6d98a40a78aff79b /generic/tkEvent.c
parentfc211e780d4c2d7a11bfe63ebbb3b95ad7d66b25 (diff)
downloadtk-5b1c3804285a3e0374833c472e26ba0cf808b705.zip
tk-5b1c3804285a3e0374833c472e26ba0cf808b705.tar.gz
tk-5b1c3804285a3e0374833c472e26ba0cf808b705.tar.bz2
Added support for the MouseWheel event.
FossilOrigin-Name: 36ac110bcfabe39cd0f8f0af96e59dd73d52646e
Diffstat (limited to 'generic/tkEvent.c')
-rw-r--r--generic/tkEvent.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 2e32b8f..6403001 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -6,11 +6,12 @@
*
* Copyright (c) 1990-1994 The Regents of the University of California.
* Copyright (c) 1994-1995 Sun Microsystems, Inc.
+ * Copyright (c) 1998 by Scriptics Corporation.
*
* 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.2 1998/09/14 18:23:09 stanton Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.3 1998/10/10 00:30:36 rjohnson Exp $
*/
#include "tkPort.h"
@@ -129,7 +130,8 @@ static unsigned long eventMasks[TK_LASTEVENT] = {
0, /* Mapping Notify */
VirtualEventMask, /* VirtualEvents */
ActivateMask, /* ActivateNotify */
- ActivateMask /* DeactivateNotify */
+ ActivateMask, /* DeactivateNotify */
+ MouseWheelMask /* MouseWheelEvent */
};
/*
@@ -546,10 +548,13 @@ Tk_HandleEvent(eventPtr)
/*
* Redirect KeyPress and KeyRelease events to the focus window,
- * or ignore them entirely if there is no focus window.
+ * or ignore them entirely if there is no focus window. We also
+ * route the MouseWheel event to the focus window. The MouseWheel
+ * event is an extension to the X event set. Currently, it is only
+ * available on the Windows version of Tk.
*/
- if (mask & (KeyPressMask|KeyReleaseMask)) {
+ if (mask & (KeyPressMask|KeyReleaseMask|MouseWheelMask)) {
winPtr->dispPtr->lastEventTime = eventPtr->xkey.time;
winPtr = TkFocusKeyEvent(winPtr, eventPtr);
if (winPtr == NULL) {