diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkScale.c | 7 | ||||
-rw-r--r-- | generic/tkScale.h | 16 |
2 files changed, 13 insertions, 10 deletions
diff --git a/generic/tkScale.c b/generic/tkScale.c index ee942e9..cb1fdce 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -18,7 +18,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkScale.c,v 1.9 1999/12/21 23:55:11 hobbs Exp $ + * RCS: @(#) $Id: tkScale.c,v 1.10 1999/12/22 20:01:07 hobbs Exp $ */ #include "tkPort.h" @@ -1084,6 +1084,7 @@ ScaleCmdDeletedProc(clientData) */ if (!(scalePtr->flags & SCALE_DELETED)) { + scalePtr->flags |= SCALE_DELETED; Tk_DestroyWindow(tkwin); } } @@ -1114,11 +1115,11 @@ TkEventuallyRedrawScale(scalePtr, what) * or REDRAW_ALL. */ { if ((what == 0) || (scalePtr->tkwin == NULL) - || (scalePtr->flags & SCALE_DELETED) || !Tk_IsMapped(scalePtr->tkwin)) { return; } - if ((scalePtr->flags & REDRAW_ALL) == 0) { + if (!(scalePtr->flags & REDRAW_PENDING)) { + scalePtr->flags |= REDRAW_PENDING; Tcl_DoWhenIdle(TkpDisplayScale, (ClientData) scalePtr); } scalePtr->flags |= what; diff --git a/generic/tkScale.h b/generic/tkScale.h index 2a5daf5..7d78dc5 100644 --- a/generic/tkScale.h +++ b/generic/tkScale.h @@ -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: tkScale.h,v 1.6 1999/12/21 23:55:11 hobbs Exp $ + * RCS: @(#) $Id: tkScale.h,v 1.7 1999/12/22 20:01:08 hobbs Exp $ */ #ifndef _TKSCALE @@ -174,6 +174,7 @@ typedef struct TkScale { * REDRAW_OTHER - 1 means other stuff besides slider and value * need to be redrawn. * REDRAW_ALL - 1 means the entire widget needs to be redrawn. + * REDRAW_PENDING - 1 means any sort of redraw is pending * ACTIVE - 1 means the widget is active (the mouse is * in its window). * INVOKE_COMMAND - 1 means the scale's command needs to be @@ -195,12 +196,13 @@ typedef struct TkScale { #define REDRAW_SLIDER (1<<0) #define REDRAW_OTHER (1<<1) #define REDRAW_ALL (REDRAW_OTHER|REDRAW_SLIDER) -#define ACTIVE (1<<2) -#define INVOKE_COMMAND (1<<3) -#define SETTING_VAR (1<<4) -#define NEVER_SET (1<<5) -#define GOT_FOCUS (1<<6) -#define SCALE_DELETED (1<<7) +#define REDRAW_PENDING (1<<2) +#define ACTIVE (1<<3) +#define INVOKE_COMMAND (1<<4) +#define SETTING_VAR (1<<5) +#define NEVER_SET (1<<6) +#define GOT_FOCUS (1<<7) +#define SCALE_DELETED (1<<8) /* * Symbolic values for the active parts of a slider. These are |