summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-08 12:53:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-08 12:53:28 (GMT)
commitc15768b7bff4bdebe68c0856c364accbef57cfd3 (patch)
treed923dec447d65ac6fc9cd3ddcdb0f32b41a1015f
parentc2a305b8ed5e188557828ca1fc623f00f180e534 (diff)
parent2c80218636b778e62c7c0707c891553b83a79a26 (diff)
downloadtk-c15768b7bff4bdebe68c0856c364accbef57cfd3.zip
tk-c15768b7bff4bdebe68c0856c364accbef57cfd3.tar.gz
tk-c15768b7bff4bdebe68c0856c364accbef57cfd3.tar.bz2
Merge 8.5.
Prevent dummy stub entry before TkpRedrawWidget/TkpWillDrawWidget entries (this is a workaround for an earlier genStubs bug, but those are new stub entries) Don't use "interp children" in testcases yet (test suite should run against Tcl 8.6.9 in Travis too)
-rw-r--r--generic/tk.decls3
-rw-r--r--generic/tkDecls.h8
-rw-r--r--generic/tkInt.decls8
-rw-r--r--generic/tkIntDecls.h41
-rw-r--r--generic/tkStubInit.c27
-rw-r--r--tests/focus.test2
-rw-r--r--unix/Makefile.in4
-rw-r--r--unix/tkUnixPort.h2
-rw-r--r--win/tkWinPort.h7
9 files changed, 58 insertions, 44 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 49acd5f..71bd066 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -1068,6 +1068,9 @@ declare 272 {
declare 273 {
void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr)
}
+declare 275 {
+ void TkUnusedStubEntry(void)
+}
# Define the platform specific public Tk interface. These functions are
# only available on the designated platform.
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 38114c0..f9c9772 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -864,6 +864,9 @@ EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr);
/* 273 */
EXTERN void Tk_CreateOldPhotoImageFormat(
const Tk_PhotoImageFormat *formatPtr);
+/* Slot 274 is reserved */
+/* 275 */
+EXTERN void TkUnusedStubEntry(void);
typedef struct {
const struct TkPlatStubs *tkPlatStubs;
@@ -1150,6 +1153,8 @@ typedef struct TkStubs {
Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */
void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */
void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */
+ void (*reserved274)(void);
+ void (*tkUnusedStubEntry) (void); /* 275 */
} TkStubs;
extern const TkStubs *tkStubsPtr;
@@ -1710,6 +1715,9 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_CreateOldImageType) /* 272 */
#define Tk_CreateOldPhotoImageFormat \
(tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */
+/* Slot 274 is reserved */
+#define TkUnusedStubEntry \
+ (tkStubsPtr->tkUnusedStubEntry) /* 275 */
#endif /* defined(USE_TK_STUBS) */
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 6cb33d3..2faf410 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -636,10 +636,10 @@ declare 184 {
}
# Support for aqua's inability to draw outside [NSView drawRect:]
-declare 185 aqua {
+declare 185 macosx {
void TkpRedrawWidget(Tk_Window tkwin)
}
-declare 186 aqua {
+declare 186 macosx {
int TkpWillDrawWidget(Tk_Window tkwin)
}
@@ -1851,7 +1851,7 @@ declare 112 aqua {
declare 114 aqua {
VisualID XVisualIDFromVisual(Visual *visual)
}
-declare 120 macosx {
+declare 120 aqua {
int XOffsetRegion(void *rgn, int dx, int dy)
}
declare 129 aqua {
@@ -1874,7 +1874,7 @@ declare 146 aqua {
unsigned int ui1, unsigned int ui2, XColor _Xconst *x1,
XColor _Xconst *x2)
}
-declare 157 macosx {
+declare 157 aqua {
KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, int i)
}
declare 158 aqua {
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 1344cc6..1018e93 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -550,14 +550,14 @@ EXTERN void TkDrawAngledChars(Display *display,
Drawable drawable, GC gc, Tk_Font tkfont,
const char *source, int numBytes, double x,
double y, double angle);
-#ifdef MAC_OSX_TK /* AQUA */
+#ifdef MAC_OSX_TCL /* MACOSX */
/* 185 */
EXTERN void TkpRedrawWidget(Tk_Window tkwin);
-#endif /* AQUA */
-#ifdef MAC_OSX_TK /* AQUA */
+#endif /* MACOSX */
+#ifdef MAC_OSX_TCL /* MACOSX */
/* 186 */
EXTERN int TkpWillDrawWidget(Tk_Window tkwin);
-#endif /* AQUA */
+#endif /* MACOSX */
typedef struct TkIntStubs {
int magic;
@@ -775,26 +775,24 @@ typedef struct TkIntStubs {
void (*tkUnderlineAngledTextLayout) (Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, double angle, int underline); /* 182 */
int (*tkIntersectAngledTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height, double angle); /* 183 */
void (*tkDrawAngledChars) (Display *display, Drawable drawable, GC gc, Tk_Font tkfont, const char *source, int numBytes, double x, double y, double angle); /* 184 */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
void (*reserved185)(void);
-#endif /* X11 */
+#endif /* UNIX */
#if defined(_WIN32) /* WIN */
void (*reserved185)(void);
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- void (*reserved185)(void); /* Dummy entry for stubs table backwards compatibility */
+#ifdef MAC_OSX_TCL /* MACOSX */
void (*tkpRedrawWidget) (Tk_Window tkwin); /* 185 */
-#endif /* AQUA */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
+#endif /* MACOSX */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
void (*reserved186)(void);
-#endif /* X11 */
+#endif /* UNIX */
#if defined(_WIN32) /* WIN */
void (*reserved186)(void);
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- void (*reserved186)(void); /* Dummy entry for stubs table backwards compatibility */
+#ifdef MAC_OSX_TCL /* MACOSX */
int (*tkpWillDrawWidget) (Tk_Window tkwin); /* 186 */
-#endif /* AQUA */
+#endif /* MACOSX */
} TkIntStubs;
extern const TkIntStubs *tkIntStubsPtr;
@@ -1167,14 +1165,14 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkIntersectAngledTextLayout) /* 183 */
#define TkDrawAngledChars \
(tkIntStubsPtr->tkDrawAngledChars) /* 184 */
-#ifdef MAC_OSX_TK /* AQUA */
+#ifdef MAC_OSX_TCL /* MACOSX */
#define TkpRedrawWidget \
(tkIntStubsPtr->tkpRedrawWidget) /* 185 */
-#endif /* AQUA */
-#ifdef MAC_OSX_TK /* AQUA */
+#endif /* MACOSX */
+#ifdef MAC_OSX_TCL /* MACOSX */
#define TkpWillDrawWidget \
(tkIntStubsPtr->tkpWillDrawWidget) /* 186 */
-#endif /* AQUA */
+#endif /* MACOSX */
#endif /* defined(USE_TK_STUBS) */
@@ -1219,5 +1217,12 @@ extern const TkIntStubs *tkIntStubsPtr;
#endif /* UNIX */
+#if !defined(MAC_OSX_TK) || defined(MAC_OSX_TCL)
+# undef TkpWillDrawWidget
+# undef TkpRedrawWidget
+# define TkpWillDrawWidget(w) 0
+# define TkpRedrawWidget(w)
+#endif
+
#endif /* _TKINTDECLS */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 17331e9..bd7af4f 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -59,6 +59,13 @@ MODULE_SCOPE const TkStubs tkStubs;
#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent
#define TkGenerateActivateEvents_ TkGenerateActivateEvents
+#if !defined(MAC_OSX_TK) || defined(MAC_OSX_TCL)
+# undef TkpWillDrawWidget
+# undef TkpRedrawWidget
+# define TkpWillDrawWidget 0
+# define TkpRedrawWidget 0
+#endif
+
#if defined(MAC_OSX_TK)
# define Tk_MacOSXGetNSWindowForDrawable TkMacOSXDrawable
# define Tk_MacOSXGetCGContextForDrawable GetCGContextForDrawable
@@ -489,26 +496,24 @@ static const TkIntStubs tkIntStubs = {
TkUnderlineAngledTextLayout, /* 182 */
TkIntersectAngledTextLayout, /* 183 */
TkDrawAngledChars, /* 184 */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
0, /* 185 */
-#endif /* X11 */
+#endif /* UNIX */
#if defined(_WIN32) /* WIN */
0, /* 185 */
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- 0, /* 185 */ /* Dummy entry for stubs table backwards compatibility */
+#ifdef MAC_OSX_TCL /* MACOSX */
TkpRedrawWidget, /* 185 */
-#endif /* AQUA */
-#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
+#endif /* MACOSX */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
0, /* 186 */
-#endif /* X11 */
+#endif /* UNIX */
#if defined(_WIN32) /* WIN */
0, /* 186 */
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
- 0, /* 186 */ /* Dummy entry for stubs table backwards compatibility */
+#ifdef MAC_OSX_TCL /* MACOSX */
TkpWillDrawWidget, /* 186 */
-#endif /* AQUA */
+#endif /* MACOSX */
};
static const TkIntPlatStubs tkIntPlatStubs = {
@@ -1315,6 +1320,8 @@ const TkStubs tkStubs = {
Tk_Interp, /* 271 */
Tk_CreateOldImageType, /* 272 */
Tk_CreateOldPhotoImageFormat, /* 273 */
+ 0, /* 274 */
+ TkUnusedStubEntry, /* 275 */
};
/* !END!: Do not edit above this line. */
diff --git a/tests/focus.test b/tests/focus.test
index 3d9d7c3..7ce2df1 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -624,7 +624,7 @@ fixfocus
test focus-6.1 {miscellaneous - embedded application in same process} -constraints {
unix testwrapper
} -setup {
- eval interp delete [interp children]
+ eval interp delete [interp slaves]
} -body {
toplevel .t
wm geometry .t +0+0
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 74c17bb..0fbfb5d 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -634,8 +634,8 @@ $(TKTEST_EXE): $(TKTEST_OBJS) $(TK_LIB_FILE)
$(MAKE) tktest-real LIB_RUNTIME_DIR="`pwd`:$(TCL_BIN_DIR)"
tktest-real: ${TK_STUB_LIB_FILE}
- ${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) ${TK_STUB_LIB_FILE} ${TCL_STUB_LIB_SPEC} @TK_BUILD_LIB_SPEC@ \
- $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o $(TKTEST_EXE)
+ ${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ $(WISH_LIBS) \
+ ${TK_STUB_LIB_FILE} ${TCL_STUB_LIB_SPEC} $(CC_SEARCH_FLAGS) -o $(TKTEST_EXE)
# # FIXME: This xttest rule seems to be broken in a number of ways. It should
# # use CC_SEARCH_FLAGS, it does not include the shared lib location logic from
diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h
index 47a0aad..09ff558 100644
--- a/unix/tkUnixPort.h
+++ b/unix/tkUnixPort.h
@@ -167,8 +167,6 @@
#define TkpButtonSetDefaults() {}
#define TkpDestroyButton(butPtr) {}
-#define TkpWillDrawWidget(tkwin) 0
-#define TkpRedrawWidget(tkwin)
#define TkSelUpdateClipboard(a,b) {}
#ifndef __CYGWIN__
#define TkSetPixmapColormap(p,c) {}
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 1ef90ff..4311b09 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -129,11 +129,4 @@
#define TkpCreateNativeBitmap(display, source) None
#define TkpGetNativeAppBitmap(display, name, w, h) None
-/*
- * Other functions not used under Windows
- */
-
-#define TkpWillDrawWidget(tkwin) 0
-#define TkpRedrawWidget(tkwin)
-
#endif /* _WINPORT */