diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-04-07 01:12:53 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-04-07 01:12:53 (GMT) |
commit | 991544634825a18479f15f47dbc0f00a5b368505 (patch) | |
tree | 613198942a873bcc72239c60dd857e0c8ed72fb4 /generic/tkTextDisp.c | |
parent | 97be0552093b567949f1e78bfc9024dc24fba4e7 (diff) | |
download | tk-991544634825a18479f15f47dbc0f00a5b368505.zip tk-991544634825a18479f15f47dbc0f00a5b368505.tar.gz tk-991544634825a18479f15f47dbc0f00a5b368505.tar.bz2 |
Further cleanup of scrolling, drawing, resize in Cocoa; thanks to Marc Culler for patches
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index bcbb03a..5f69690 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -3954,6 +3954,19 @@ 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); @@ -3961,14 +3974,6 @@ 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); @@ -3980,14 +3985,6 @@ 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, |