summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkCanvPoly.c2
-rw-r--r--generic/tkCmds.c2
-rw-r--r--generic/tkInt.decls3
-rw-r--r--generic/tkIntXlibDecls.h8
-rw-r--r--generic/tkStubInit.c2
-rw-r--r--macosx/tkMacOSXSubwindows.c7
-rw-r--r--unix/tcl.m438
-rw-r--r--win/tkWinFont.c9
8 files changed, 52 insertions, 19 deletions
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index eeba814..2663894 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -121,7 +121,7 @@ static const Tk_ConfigSpec configSpecs[] = {
"0,0", offsetof(PolygonItem, tsoffset),
TK_CONFIG_NULL_OK, &offsetOption},
{TK_CONFIG_COLOR, "-outline", NULL, NULL,
- DEF_CANVITEM_OUTLINE, offsetof(PolygonItem, outline.color), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, outline.color), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-outlineoffset", NULL, NULL,
"0,0", offsetof(PolygonItem, outline.tsoffset),
TK_CONFIG_NULL_OK, &offsetOption},
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 4908fee..d7f742a 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -882,7 +882,7 @@ UseinputmethodsCmd(
&boolVal) != TCL_OK) {
return TCL_ERROR;
}
- if (boolVal) {
+ if (boolVal && (dispPtr->inputMethod != NULL)) {
dispPtr->flags |= TK_DISPLAY_USE_IM;
} else {
dispPtr->flags &= ~TK_DISPLAY_USE_IM;
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 378cc6b..0b0a370 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -1880,6 +1880,9 @@ declare 122 macosx {
Visual *visual, unsigned long value_mask,
XSetWindowAttributes *attributes)
}
+declare 129 macosx {
+ int XLowerWindow(Display *d, Window w)
+}
declare 130 macosx {
int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n)
}
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index 65de70c..ce590a2 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -745,7 +745,8 @@ EXTERN Window XCreateWindow(Display *display, Window parent, int x,
/* Slot 126 is reserved */
/* Slot 127 is reserved */
/* Slot 128 is reserved */
-/* Slot 129 is reserved */
+/* 129 */
+EXTERN int XLowerWindow(Display *d, Window w);
/* 130 */
EXTERN int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a,
int n);
@@ -1069,7 +1070,7 @@ typedef struct TkIntXlibStubs {
void (*reserved126)(void);
void (*reserved127)(void);
void (*reserved128)(void);
- void (*reserved129)(void);
+ int (*xLowerWindow) (Display *d, Window w); /* 129 */
int (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */
int (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */
int (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */
@@ -1612,7 +1613,8 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
/* Slot 126 is reserved */
/* Slot 127 is reserved */
/* Slot 128 is reserved */
-/* Slot 129 is reserved */
+#define XLowerWindow \
+ (tkIntXlibStubsPtr->xLowerWindow) /* 129 */
#define XFillArcs \
(tkIntXlibStubsPtr->xFillArcs) /* 130 */
#define XDrawArcs \
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index bc2fd7c..de0bc84 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -870,7 +870,7 @@ static const TkIntXlibStubs tkIntXlibStubs = {
0, /* 126 */
0, /* 127 */
0, /* 128 */
- 0, /* 129 */
+ XLowerWindow, /* 129 */
XFillArcs, /* 130 */
XDrawArcs, /* 131 */
XDrawRectangles, /* 132 */
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 5ff77cb..8cea610 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -615,7 +615,6 @@ XRaiseWindow(
return Success;
}
-#if 0
/*
*----------------------------------------------------------------------
*
@@ -632,7 +631,7 @@ XRaiseWindow(
*----------------------------------------------------------------------
*/
-void
+int
XLowerWindow(
Display *display, /* Display. */
Window window) /* Window. */
@@ -643,12 +642,12 @@ XLowerWindow(
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
TkWmRestackToplevel(macWin->winPtr, Below, NULL);
} else {
- /*
+ /*
* TODO: this should generate damage
*/
}
+ return Success;
}
-#endif
/*
*----------------------------------------------------------------------
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 70303cee..93efb49 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2518,7 +2518,20 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[
#
#--------------------------------------------------------------------
-AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [
+AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [
+ # Avoids picking hidden internal symbol from libc
+ SC_TCL_GETHOSTBYADDR_R_DECL
+
+ if test "$tcl_cv_api_gethostbyaddr_r" = yes; then
+ SC_TCL_GETHOSTBYADDR_R_TYPE
+ fi
+])
+
+AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_DECL], [AC_CHECK_DECLS(gethostbyaddr_r, [
+ tcl_cv_api_gethostbyaddr_r=yes],[tcl_cv_api_gethostbyaddr_r=no],[#include <netdb.h>])
+])
+
+AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_TYPE], [AC_CHECK_FUNC(gethostbyaddr_r, [
AC_CACHE_CHECK([for gethostbyaddr_r with 7 args], tcl_cv_api_gethostbyaddr_r_7, [
AC_TRY_COMPILE([
#include <netdb.h>
@@ -2579,14 +2592,27 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [
# Results:
#
# Might define the following vars:
-# HAVE_GETHOSTBYADDR_R
-# HAVE_GETHOSTBYADDR_R_3
-# HAVE_GETHOSTBYADDR_R_5
-# HAVE_GETHOSTBYADDR_R_6
+# HAVE_GETHOSTBYNAME_R
+# HAVE_GETHOSTBYNAME_R_3
+# HAVE_GETHOSTBYNAME_R_5
+# HAVE_GETHOSTBYNAME_R_6
#
#--------------------------------------------------------------------
-AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [
+AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [
+ # Avoids picking hidden internal symbol from libc
+ SC_TCL_GETHOSTBYNAME_R_DECL
+
+ if test "$tcl_cv_api_gethostbyname_r" = yes; then
+ SC_TCL_GETHOSTBYNAME_R_TYPE
+ fi
+])
+
+AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_DECL], [AC_CHECK_DECLS(gethostbyname_r, [
+ tcl_cv_api_gethostbyname_r=yes],[tcl_cv_api_gethostbyname_r=no],[#include <netdb.h>])
+])
+
+AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_TYPE], [AC_CHECK_FUNC(gethostbyname_r, [
AC_CACHE_CHECK([for gethostbyname_r with 6 args], tcl_cv_api_gethostbyname_r_6, [
AC_TRY_COMPILE([
#include <netdb.h>
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 980fd4b..e48f93c 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -2482,7 +2482,8 @@ GetScreenFont(
lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
Tcl_DStringInit(&ds);
- wcsncpy(lf.lfFaceName, Tcl_UtfToWCharDString(faceName, -1, &ds), LF_FACESIZE-1);
+ Tcl_UtfToWCharDString(faceName, -1, &ds);
+ wcsncpy(lf.lfFaceName, (WCHAR *)Tcl_DStringValue(&ds), LF_FACESIZE-1);
Tcl_DStringFree(&ds);
lf.lfFaceName[LF_FACESIZE-1] = 0;
hFont = CreateFontIndirectW(&lf);
@@ -2516,6 +2517,9 @@ FamilyExists(
int result;
Tcl_DString faceString;
+ Tcl_DStringInit(&faceString);
+ Tcl_UtfToWCharDString(faceName, -1, &faceString);
+
/*
* If the family exists, WinFontExistProc() will be called and
* EnumFontFamilies() will return whatever WinFontExistProc() returns. If
@@ -2523,8 +2527,7 @@ FamilyExists(
* non-zero value.
*/
- Tcl_DStringInit(&faceString);
- result = EnumFontFamiliesW(hdc, Tcl_UtfToWCharDString(faceName, -1, &faceString),
+ result = EnumFontFamiliesW(hdc, (WCHAR *)Tcl_DStringValue(&faceString),
(FONTENUMPROCW) WinFontExistProc, 0);
Tcl_DStringFree(&faceString);
return (result == 0);