diff options
author | das <das> | 2007-04-23 21:15:17 (GMT) |
---|---|---|
committer | das <das> | 2007-04-23 21:15:17 (GMT) |
commit | eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92 (patch) | |
tree | 32076caa36b64498e5a51239d238793d593cfd09 /generic/ttk | |
parent | b5c021fb2226984ca793d193dd65e007f6780ea4 (diff) | |
download | tk-eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92.zip tk-eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92.tar.gz tk-eed9e6e51c9b315cca0fab5242fb5d5ed79f1d92.tar.bz2 |
* generic/tkCanvas.c: allow -selectforeground option to be None; add
* generic/tkCanvText.c: fallback to fgColor when selFgColor is None
* generic/tkEntry.c: (new default on aqua to match native L&F).
* generic/tkListbox.c:
* generic/tkText.c:
* generic/tkCanvas.c: add support for bypassing all of Tk's double
* generic/tkEntry.c: buffered drawing into intermediate pixmaps
* generic/tkFrame.c: (via TK_NO_DOUBLE_BUFFERING #define), it is
* generic/tkListbox.c: unnecessary & wasteful on aqua where all
* generic/tkPanedWindow.c: drawing is already double-buffered by the
* generic/tkTextDisp.c: window server. (Use of this on other
* generic/ttk/ttkWidget.c: platforms would only require implementation
* unix/tkUnixScale.c: of TkpClipDrawableToRect()).
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkWidget.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index 98992ce..6fbb53b 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -1,4 +1,4 @@ -/* $Id: ttkWidget.c,v 1.6 2007/03/07 23:49:38 das Exp $ +/* $Id: ttkWidget.c,v 1.7 2007/04/23 21:15:19 das Exp $ * Copyright (c) 2003, Joe English * * Ttk widget implementation, core widget utilities. @@ -10,6 +10,10 @@ #include "ttkTheme.h" #include "ttkWidget.h" +#ifdef MAC_OSX_TK +#define TK_NO_DOUBLE_BUFFERING 1 +#endif + /*------------------------------------------------------------------------ * +++ Internal helper routines. */ @@ -58,14 +62,17 @@ static void RedisplayWidget(ClientData recordPtr) WidgetCore *corePtr = (WidgetCore *)recordPtr; Tk_Window tkwin = corePtr->tkwin; Drawable d; +#ifndef TK_NO_DOUBLE_BUFFERING XGCValues gcValues; GC gc; +#endif /* TK_NO_DOUBLE_BUFFERING */ corePtr->flags &= ~REDISPLAY_PENDING; if (!Tk_IsMapped(tkwin)) { return; } +#ifndef TK_NO_DOUBLE_BUFFERING /* * Get a Pixmap for drawing in the background: */ @@ -79,6 +86,9 @@ static void RedisplayWidget(ClientData recordPtr) gcValues.function = GXcopy; gcValues.graphics_exposures = False; gc = Tk_GetGC(corePtr->tkwin, GCFunction|GCGraphicsExposures, &gcValues); +#else + d = Tk_WindowId(tkwin); +#endif /* TK_NO_DOUBLE_BUFFERING */ /* * Recompute layout and draw widget contents: @@ -86,6 +96,7 @@ static void RedisplayWidget(ClientData recordPtr) corePtr->widgetSpec->layoutProc(recordPtr); corePtr->widgetSpec->displayProc(recordPtr, d); +#ifndef TK_NO_DOUBLE_BUFFERING /* * Copy to the screen. */ @@ -98,6 +109,7 @@ static void RedisplayWidget(ClientData recordPtr) */ Tk_FreePixmap(Tk_Display(tkwin), d); Tk_FreeGC(Tk_Display(tkwin), gc); +#endif /* TK_NO_DOUBLE_BUFFERING */ } /* TtkRedisplayWidget -- |