summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-04-07 02:18:22 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-04-07 02:18:22 (GMT)
commite775b13da67a5d546caac2cf1a2c76d63d80d254 (patch)
treeeada5f6f8b66048ffdb316cba2b650eae62bc8d0 /generic/tkTextDisp.c
parent809ebd7b888f6a543597c4a087f50f2719093108 (diff)
downloadtk-e775b13da67a5d546caac2cf1a2c76d63d80d254.zip
tk-e775b13da67a5d546caac2cf1a2c76d63d80d254.tar.gz
tk-e775b13da67a5d546caac2cf1a2c76d63d80d254.tar.bz2
Backing out changes; unexpected issues with window resizing that require further investigation
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 5f69690..bcbb03a 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -3954,19 +3954,6 @@ DisplayText(
return;
}
-#ifdef MAC_OSX_TK
- /*
- * If drawing is disabled, all we need to do is
- * clear the REDRAW_PENDING flag.
- */
- TkWindow *winPtr = (TkWindow *)(textPtr->tkwin);
- MacDrawable *macWin = winPtr->privatePtr;
- if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){
- dInfoPtr->flags &= ~REDRAW_PENDING;
- return;
- }
-#endif
-
interp = textPtr->interp;
Tcl_Preserve((ClientData) interp);
@@ -3974,6 +3961,14 @@ DisplayText(
Tcl_SetVar2(interp, "tk_textRelayout", NULL, "", TCL_GLOBAL_ONLY);
}
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
+ /*
+ * The widget has been deleted. Don't do anything.
+ */
+
+ goto end;
+ }
+
if (!Tk_IsMapped(textPtr->tkwin) || (dInfoPtr->maxX <= dInfoPtr->x)
|| (dInfoPtr->maxY <= dInfoPtr->y)) {
UpdateDisplayInfo(textPtr);
@@ -3985,6 +3980,14 @@ DisplayText(
Tcl_SetVar2(interp, "tk_textRedraw", NULL, "", TCL_GLOBAL_ONLY);
}
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
+ /*
+ * The widget has been deleted. Don't do anything.
+ */
+
+ goto end;
+ }
+
/*
* Choose a new current item if that is needed (this could cause event
* handlers to be invoked, hence the preserve/release calls and the loop,