From 009ece320d1dad3ff4557d55b5859b4512d1660e Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Tue, 30 Sep 2003 23:26:09 +0000 Subject: Add an implementation of XSync that flushes the window buffers. This fixes 814810. Also use tk text drawing for checkbutton & radiobutton labels. --- ChangeLog | 8 ++++++++ macosx/tkMacOSXButton.c | 8 ++++++-- macosx/tkMacOSXEvent.c | 12 +++++++++++- macosx/tkMacOSXPort.h | 5 +++-- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4201ce0..1ecb899 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-09-30 Jim Ingham + + * macosx/tkMacOSXButton.c (TkpDisplayButton): Use the tk text + drawing for checkbuttons & radiobuttons as well as for labels. + * macosx/tkMacOSXEvent.c (XSync): New function, need to implement + this so drawing will get flushed in "update idletasks". + * tkMacOSXPort.h: convert #define of XSync to function def'n. + 2003-09-30 Donal K. Fellows * library/demos/browse: Added suitable [package require] diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index b84fa44..9c442bd 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.5 2003/09/25 05:37:00 das Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.6 2003/09/30 23:26:09 wolfsuit Exp $ */ #include "tkButton.h" @@ -223,7 +223,11 @@ TkpDisplayButton( if (TkMacOSXComputeDrawParams(butPtr, &drawParams) ) { macButtonPtr->usingControl=1; - macButtonPtr->useTkText=DEFAULT_USE_TK_TEXT; + if (butPtr->type == TYPE_BUTTON) { + macButtonPtr->useTkText = 0; + } else { + macButtonPtr->useTkText = 1; + } } else { macButtonPtr->usingControl=0; macButtonPtr->useTkText=1; diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c index f0448e6..e426a8a 100644 --- a/macosx/tkMacOSXEvent.c +++ b/macosx/tkMacOSXEvent.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.3 2003/02/19 19:27:46 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.4 2003/09/30 23:26:09 wolfsuit Exp $ */ #include @@ -73,6 +73,16 @@ tkMacOSXFlushWindows () } } + + +int +XSync (Display *display, Bool flag) +{ + tkMacOSXFlushWindows(); + display->request++; + return 0; +} + /* *---------------------------------------------------------------------- * diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h index 8f9d2be..def575d 100644 --- a/macosx/tkMacOSXPort.h +++ b/macosx/tkMacOSXPort.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXPort.h,v 1.3 2002/09/26 17:07:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXPort.h,v 1.4 2003/09/30 23:26:09 wolfsuit Exp $ */ #ifndef _TKMACPORT @@ -159,9 +159,10 @@ extern int strncasecmp _ANSI_ARGS_((CONST char *s1, #define XNoOp(display) {display->request++;} #define XUngrabServer(display) #define XSynchronize(display, bool) {display->request++;} -#define XSync(display, bool) {display->request++;} #define XVisualIDFromVisual(visual) (visual->visualid) +int XSync(Display *display, Bool discard); + /* * The following functions are not used on the Mac, so we stub them out. */ -- cgit v0.12