summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-08 13:44:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-08 13:44:33 (GMT)
commit95aa66aaac53bd1a8b29fd542ec754556343c7a9 (patch)
treed8a00e5168a7cd335ccad089e242e651520a0d50
parentc15768b7bff4bdebe68c0856c364accbef57cfd3 (diff)
downloadtk-95aa66aaac53bd1a8b29fd542ec754556343c7a9.zip
tk-95aa66aaac53bd1a8b29fd542ec754556343c7a9.tar.gz
tk-95aa66aaac53bd1a8b29fd542ec754556343c7a9.tar.bz2
Don't fill stub entries for TkpWillDrawWidget/TkpRedrawWidget with 0 on XQuarz so they can be called by extensions
-rw-r--r--generic/tkIntDecls.h2
-rw-r--r--generic/tkStubInit.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 1018e93..7057411 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -1217,7 +1217,7 @@ extern const TkIntStubs *tkIntStubsPtr;
#endif /* UNIX */
-#if !defined(MAC_OSX_TK) || defined(MAC_OSX_TCL)
+#if !defined(MAC_OSX_TK)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
# define TkpWillDrawWidget(w) 0
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index bd7af4f..ee79926 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -59,11 +59,17 @@ MODULE_SCOPE const TkStubs tkStubs;
#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent
#define TkGenerateActivateEvents_ TkGenerateActivateEvents
-#if !defined(MAC_OSX_TK) || defined(MAC_OSX_TCL)
+#if !defined(MAC_OSX_TK)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
-# define TkpWillDrawWidget 0
-# define TkpRedrawWidget 0
+static int
+doNothing(void)
+{
+ /* dummy implementation, no need to do anything */
+ return 0;
+}
+# define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing)
+# define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing)
#endif
#if defined(MAC_OSX_TK)