summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.c
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-10-10 00:30:34 (GMT)
committerrjohnson <rjohnson>1998-10-10 00:30:34 (GMT)
commit6b30648b424171905375ec916ab86186a3043dfc (patch)
tree5d1b6c4f80c96cbc9337259a6d98a40a78aff79b /generic/tkEvent.c
parent733f2ab4691d31c0fdca72da988c5f4878ee5709 (diff)
downloadtk-6b30648b424171905375ec916ab86186a3043dfc.zip
tk-6b30648b424171905375ec916ab86186a3043dfc.tar.gz
tk-6b30648b424171905375ec916ab86186a3043dfc.tar.bz2
Added support for the MouseWheel event.
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) {