summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2005-02-28 22:11:57 (GMT)
committerhobbs <hobbs@noemail.net>2005-02-28 22:11:57 (GMT)
commita0f529f2bc1a37aa3736a3f3dad1c81783b88e0a (patch)
tree61a110427b0ecfd0e9237318a25582b7391773a5 /win
parentcde6d1a66a35da62eb0b9bf25bae0f1aa2f4ca57 (diff)
downloadtk-a0f529f2bc1a37aa3736a3f3dad1c81783b88e0a.zip
tk-a0f529f2bc1a37aa3736a3f3dad1c81783b88e0a.tar.gz
tk-a0f529f2bc1a37aa3736a3f3dad1c81783b88e0a.tar.bz2
* win/tkWinX.c (GenerateXEvent): correct %A translation on
MouseWheel [Bug 1118340] FossilOrigin-Name: 01b5ef3f812f49bde11a587483d0e7255d537440
Diffstat (limited to 'win')
-rw-r--r--win/tkWinX.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index b8e8209..a0922c6 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinX.c,v 1.43 2005/01/31 04:08:32 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinX.c,v 1.44 2005/02/28 22:11:57 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -1056,14 +1056,14 @@ GenerateXEvent(hwnd, message, wParam, lParam)
Tk_InternAtom((Tk_Window)winPtr, "CLIPBOARD");
event.xselectionclear.time = TkpGetMS();
break;
-
+
case WM_MOUSEWHEEL:
/*
* The mouse wheel event is closer to a key event than a
* mouse event in that the message is sent to the window
* that has focus.
*/
-
+
case WM_CHAR:
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
@@ -1078,7 +1078,7 @@ GenerateXEvent(hwnd, message, wParam, lParam)
/*
* Compute the screen and window coordinates of the event.
*/
-
+
msgPos = GetMessagePos();
rootPoint = MAKEPOINTS(msgPos);
clientPoint.x = rootPoint.x;
@@ -1110,11 +1110,14 @@ GenerateXEvent(hwnd, message, wParam, lParam)
* We have invented a new X event type to handle
* this event. It still uses the KeyPress struct.
* However, the keycode field has been overloaded
- * to hold the zDelta of the wheel.
+ * to hold the zDelta of the wheel. Set nbytes to 0
+ * to prevent conversion of the keycode to a keysym
+ * in TkpGetString. [Bug 1118340].
*/
-
+
event.type = MouseWheelEvent;
event.xany.send_event = -1;
+ event.xany.nbytes = 0;
event.xkey.keycode = (short) HIWORD(wParam);
break;
case WM_SYSKEYDOWN: