summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-02-28 22:10:26 (GMT)
committerhobbs <hobbs>2005-02-28 22:10:26 (GMT)
commitdc71cdb6538bca1cc18049efc52d111bc5b0ee98 (patch)
tree19e75d9a198c28e7f3dfe482b89582b674a0d7b3
parentb666f2172c96229719e826da2f0e75996908f6a5 (diff)
downloadtk-dc71cdb6538bca1cc18049efc52d111bc5b0ee98.zip
tk-dc71cdb6538bca1cc18049efc52d111bc5b0ee98.tar.gz
tk-dc71cdb6538bca1cc18049efc52d111bc5b0ee98.tar.bz2
* win/tkWinX.c (GenerateXEvent): correct %A translation on
MouseWheel [Bug 1118340]
-rw-r--r--ChangeLog13
-rw-r--r--win/tkWinX.c19
2 files changed, 24 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 57f1ec8..c8791b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-02-28 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * win/tkWinX.c (GenerateXEvent): correct %A translation on
+ MouseWheel [Bug 1118340]
+
+2005-02-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * unix/tkUnixFont.c (FontMapLoadPage): swap decl of char arrays to
+ avoid aligment issues in Tcl_UtfToExternal. [Bug 1122671]
+
+ * unix/configure, unix/configure.in: add AC_C_BIGENDIAN check
+ which defines WORDS_BIGENDIAN on BE machines.
+
2005-02-24 Daniel Steffen <das@users.sourceforge.net>
* macosx/tkMacOSX.h: fixed incorrect inclusion of internal header.
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 7ca4ad5..4b28faa 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.25.2.5 2004/10/27 00:37:38 davygrvy Exp $
+ * RCS: @(#) $Id: tkWinX.c,v 1.25.2.6 2005/02/28 22:10:26 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -996,7 +996,7 @@ GenerateXEvent(hwnd, message, wParam, lParam)
case WM_SETFOCUS:
case WM_KILLFOCUS: {
TkWindow *otherWinPtr = (TkWindow *)Tk_HWNDToWindow((HWND) wParam);
-
+
/*
* Compare toplevel windows to avoid reporting focus
* changes within the same toplevel.
@@ -1052,14 +1052,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:
@@ -1074,7 +1074,7 @@ GenerateXEvent(hwnd, message, wParam, lParam)
/*
* Compute the screen and window coordinates of the event.
*/
-
+
msgPos = GetMessagePos();
rootPoint = MAKEPOINTS(msgPos);
clientPoint.x = rootPoint.x;
@@ -1106,11 +1106,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.xkey.nbytes = 0;
event.xkey.keycode = (short) HIWORD(wParam);
break;
case WM_SYSKEYDOWN:
@@ -1122,7 +1125,7 @@ GenerateXEvent(hwnd, message, wParam, lParam)
* event was generated by windows and that the Windows
* extension xkey.trans_chars is filled with the
* MBCS characters that came from the TranslateMessage
- * call.
+ * call.
*/
event.type = KeyPress;