summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkWidget.c
diff options
context:
space:
mode:
authordas <das@noemail.net>2007-03-07 23:46:32 (GMT)
committerdas <das@noemail.net>2007-03-07 23:46:32 (GMT)
commit00c0c2b4eb2c0e388068aaa0b57de64ee916ce77 (patch)
treeb327533aebd6e8b2b22cd04e1e847fddbe5de52d /generic/ttk/ttkWidget.c
parent9ae8cfc854e6cd3e2ca0ec327a4b8dc8efd85d99 (diff)
downloadtk-00c0c2b4eb2c0e388068aaa0b57de64ee916ce77.zip
tk-00c0c2b4eb2c0e388068aaa0b57de64ee916ce77.tar.gz
tk-00c0c2b4eb2c0e388068aaa0b57de64ee916ce77.tar.bz2
* generic/tkMain.c (Tk_MainEx): replicate macosx-specific code from
TkpInit() that ensures the console window appears when wish is started from the OS X Finder (i.e. with stdin == /dev/null), jeffh's 2006-11-24 change rendered the corresponding code in TkpInit() ineffective in wish because Tk_MainEx() sets tcl_interactive before calling TkpInit(). * generic/ttk/ttkGenStubs.tcl (new): add ttk-specific genstubs.tcl from * unix/Makefile.in (genstubs): tile and run it from 'genstubs' target, restores ability to generate all of Tk's stub sources. * generic/ttk/ttkTreeview.c: #ifdef out unused declaration. * macosx/tkMacOSXDebug.c (TkMacOSXGetNamedDebugSymbol): add fix for libraries loaded with a DYLD_IMAGE_SUFFIX. * macosx/Wish.xcodeproj/project.pbxproj: ensure gcc version used by * macosx/Wish.xcodeproj/default.pbxuser: Xcode and configure/make are * macosx/Wish-Common.xcconfig: consistent and independent of gcc_select default and CC env var; fixes for Xcode 3.0. * unix/tcl.m4 (Darwin): s/CFLAGS/CPPFLAGS/ in macosx-version-min check. * unix/configure: autoconf-2.59 FossilOrigin-Name: 8d6881d600e31dd8b24298ff815f364b505008c9
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 7a9ca26..4562973 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -1,4 +1,4 @@
-/* $Id: ttkWidget.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
+/* $Id: ttkWidget.c,v 1.5 2007/03/07 23:46:34 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
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
/*
* 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
}
/* TtkRedisplayWidget --