summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkFrame.c1
-rw-r--r--generic/tkInt.h2
-rw-r--r--generic/tkWindow.c2
-rw-r--r--macosx/tkMacOSXFont.c4
-rw-r--r--macosx/tkMacOSXSubwindows.c2
-rw-r--r--macosx/tkMacOSXXStubs.c2
-rw-r--r--unix/tkUnixFont.c2
-rw-r--r--unix/tkUnixRFont.c6
-rw-r--r--win/tkWinFont.c2
-rw-r--r--win/tkWinX.c19
10 files changed, 22 insertions, 20 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index f6edfb0..0f1a1b3 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -458,7 +458,6 @@ TkListCreateFrame(
* window associated with the interpreter.
* Gives the base name to use for the new
* application. */
-
{
int objc;
Tcl_Obj **objv;
diff --git a/generic/tkInt.h b/generic/tkInt.h
index f360f08..1615a81 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -1196,7 +1196,7 @@ MODULE_SCOPE void TkUnderlineCharsInContext(Display *display,
const char *string, int numBytes, int x, int y,
int firstByte, int lastByte);
MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont,
- Tcl_UniChar c, struct TkFontAttributes *faPtr);
+ int c, struct TkFontAttributes *faPtr);
MODULE_SCOPE Tcl_Obj * TkNewWindowObj(Tk_Window tkwin);
MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy);
MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy);
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 0c60321..5855b7c 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3101,7 +3101,7 @@ Initialize(
Tcl_ListObjAppendElement(NULL, cmd,
Tcl_NewStringObj("::safe::TkInit", -1));
Tcl_ListObjAppendElement(NULL, cmd, Tcl_GetObjResult(master));
-
+
/*
* Step 2 : Eval in the master. The argument is the *reversed* interp
* path of the slave.
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index c48e56e..d3e0e41 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -672,14 +672,14 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes* faPtr) /* Output: Font attributes */
{
MacFont *fontPtr = (MacFont *) tkfont;
NSFont *nsFont = fontPtr->nsFont;
*faPtr = fontPtr->font.fa;
if (nsFont && ![[nsFont coveredCharacterSet] characterIsMember:c]) {
- UTF16Char ch = c;
+ UTF16Char ch = (UTF16Char) c;
nsFont = [nsFont bestMatchingFontForCharacters:&ch
length:1 attributes:nil actualCoveredLength:NULL];
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 9851474..f92d260 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -365,7 +365,7 @@ XMoveResizeWindow(
CGFloat Y = (CGFloat)y;
CGFloat Width = (CGFloat)width;
CGFloat Height = (CGFloat)height;
- CGFloat XOff = (CGFloat)macWin->winPtr->wmInfoPtr->xInParent;
+ CGFloat XOff = (CGFloat)macWin->winPtr->wmInfoPtr->xInParent;
CGFloat YOff = (CGFloat)macWin->winPtr->wmInfoPtr->yInParent;
NSRect r = NSMakeRect(X + XOff,
tkMacOSXZeroScreenHeight - Y - YOff - Height,
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index a2d175b..1ed526d 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -897,7 +897,7 @@ XGetImage(
* We do not support any other values here.
*/
int scalefactor = 1;
- if (win && [win respondsToSelector:@selector(backingScaleFactor)]) {
+ if (win && [win respondsToSelector:@selector(backingScaleFactor)]) {
scalefactor = ([win backingScaleFactor] == 2.0) ? 2 : 1;
}
int scaled_height = height * scalefactor;
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index a4998aa..af9bb95 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -946,7 +946,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
FontAttributes atts;
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 36e5462..8caa5ff 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -615,7 +615,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
@@ -778,7 +778,7 @@ LookUpColor(Display *display, /* Display to lookup colors on */
i >= 0; last2 = last, last = i, i = fontPtr->colors[i].next) {
if (pixel == fontPtr->colors[i].color.pixel) {
- /*
+ /*
* Color found in cache. Move it to the front of the list and return it.
*/
if (last >= 0) {
@@ -802,7 +802,7 @@ LookUpColor(Display *display, /* Display to lookup colors on */
last = fontPtr->ncolors++;
}
- /*
+ /*
* Translate the pixel value to a color. Needs a server round-trip.
*/
xcolor.pixel = pixel;
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 940bc10..10ea1b9 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -743,7 +743,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
WinFont *fontPtr = (WinFont *) tkfont;
diff --git a/win/tkWinX.c b/win/tkWinX.c
index bb60a2d..e13bb4f 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -92,7 +92,7 @@ static Tcl_ThreadDataKey dataKey;
static void GenerateXEvent(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
static unsigned int GetState(UINT message, WPARAM wParam, LPARAM lParam);
-static void GetTranslatedKey(XKeyEvent *xkey);
+static void GetTranslatedKey(XKeyEvent *xkey, UINT type);
static void UpdateInputLanguage(int charset);
static int HandleIMEComposition(HWND hwnd, LPARAM lParam);
@@ -1157,7 +1157,8 @@ GenerateXEvent(
event.type = KeyPress;
event.xany.send_event = -1;
event.xkey.keycode = wParam;
- GetTranslatedKey(&event.xkey);
+ GetTranslatedKey(&event.xkey, (message == WM_KEYDOWN) ? WM_CHAR :
+ WM_SYSCHAR);
break;
case WM_SYSKEYUP:
@@ -1229,9 +1230,10 @@ GenerateXEvent(
if (IsDBCSLeadByte((BYTE) wParam)) {
MSG msg;
- if ((PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) != 0)
+ if ((PeekMessage(&msg, NULL, WM_CHAR, WM_CHAR,
+ PM_NOREMOVE) != 0)
&& (msg.message == WM_CHAR)) {
- GetMessage(&msg, NULL, 0, 0);
+ GetMessage(&msg, NULL, WM_CHAR, WM_CHAR);
event.xkey.nbytes = 2;
event.xkey.trans_chars[1] = (char) msg.wParam;
}
@@ -1370,19 +1372,20 @@ GetState(
static void
GetTranslatedKey(
- XKeyEvent *xkey)
+ XKeyEvent *xkey,
+ UINT type)
{
MSG msg;
xkey->nbytes = 0;
while ((xkey->nbytes < XMaxTransChars)
- && PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE)) {
- if ((msg.message != WM_CHAR) && (msg.message != WM_SYSCHAR)) {
+ && (PeekMessageA(&msg, NULL, type, type, PM_NOREMOVE) != 0)) {
+ if (msg.message != type) {
break;
}
- GetMessageA(&msg, NULL, 0, 0);
+ GetMessageA(&msg, NULL, type, type);
/*
* If this is a normal character message, we may need to strip off the