summaryrefslogtreecommitdiffstats
path: root/generic/tkMessage.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkMessage.c')
-rw-r--r--generic/tkMessage.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index e0761a1..bfb10c2 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -21,6 +21,13 @@
* managed by this file:
*/
+#ifdef TK_NO_DEPRECATED
+# undef DEF_MESSAGE_PADX
+# undef DEF_MESSAGE_PADY
+# define DEF_MESSAGE_PADX NULL
+# define DEF_MESSAGE_PADY NULL
+#endif
+
typedef struct {
Tk_Window tkwin; /* Window that embodies the message. NULL
* means that the window has been destroyed
@@ -544,9 +551,21 @@ MessageWorldChanged(
Tk_GetFontMetrics(msgPtr->tkfont, &fm);
if (msgPtr->padX < 0) {
msgPtr->padX = fm.ascent / 2;
+#ifndef TK_NO_DEPRECATED
+ if (msgPtr->padXPtr) {
+ Tcl_DecrRefCount(msgPtr->padXPtr);
+ msgPtr->padXPtr = NULL;
+ }
+#endif
}
if (msgPtr->padY == -1) {
msgPtr->padY = fm.ascent / 4;
+#ifndef TK_NO_DEPRECATED
+ if (msgPtr->padYPtr) {
+ Tcl_DecrRefCount(msgPtr->padYPtr);
+ msgPtr->padYPtr = NULL;
+ }
+#endif
}
/*