summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkWidget.c
diff options
context:
space:
mode:
authordas <das>2007-04-23 21:15:17 (GMT)
committerdas <das>2007-04-23 21:15:17 (GMT)
commiteed9e6e51c9b315cca0fab5242fb5d5ed79f1d92 (patch)
tree32076caa36b64498e5a51239d238793d593cfd09 /generic/ttk/ttkWidget.c
parentb5c021fb2226984ca793d193dd65e007f6780ea4 (diff)
downloadtk-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/ttkWidget.c')
-rw-r--r--generic/ttk/ttkWidget.c14
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 --