diff options
Diffstat (limited to 'generic/ttk/ttkWidget.c')
-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 -- |