diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-04-09 02:00:49 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-04-09 02:00:49 (GMT) |
commit | 69e749839382af95c02bdb100c49402eb6b926ae (patch) | |
tree | e0d98826c7a37d1a2c4e79ce3376a5f0054ec088 /generic/tkTextDisp.c | |
parent | 9f2f06f947fdb1bc1d9c47da80db1ec6728b32a2 (diff) | |
download | tk-69e749839382af95c02bdb100c49402eb6b926ae.zip tk-69e749839382af95c02bdb100c49402eb6b926ae.tar.gz tk-69e749839382af95c02bdb100c49402eb6b926ae.tar.bz2 |
Re-working of internal Cocoa widget drawing routines, especially when resizing; fix rendering of scrollbar when resized or clipped; cleanup of button metrics; thanks to Marc Culler for extensive patches
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 95ea935..a95bb91 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -3948,6 +3948,18 @@ DisplayText( * warnings. */ Tcl_Interp *interp; +#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 if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) { /* @@ -3964,14 +3976,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); @@ -3983,14 +3987,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, |