diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-04-07 01:42:59 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-04-07 01:42:59 (GMT) |
commit | 6540e0be10afe7208f8e370632256cfd262f5706 (patch) | |
tree | b5bae340eed26502e2261af9d5f190b6893f1b2d /generic/tkTextDisp.c | |
parent | ccdac05dbacc3b62fc27a65c11c8bd1188daddf4 (diff) | |
download | tk-6540e0be10afe7208f8e370632256cfd262f5706.zip tk-6540e0be10afe7208f8e370632256cfd262f5706.tar.gz tk-6540e0be10afe7208f8e370632256cfd262f5706.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.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index c3bcd5e..95ea935 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -3948,6 +3948,7 @@ DisplayText( * warnings. */ Tcl_Interp *interp; + if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) { /* * The widget has been deleted. Don't do anything. @@ -3956,19 +3957,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(interp); @@ -3976,6 +3964,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); @@ -3987,6 +3983,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, |