summaryrefslogtreecommitdiffstats
path: root/mac/tkMacScale.c
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-22 20:01:07 (GMT)
committerhobbs <hobbs>1999-12-22 20:01:07 (GMT)
commit82910603b0e4d9c0fe57e826977e1f63eb12c3f7 (patch)
treec3c034b8b2f399802ef45b51f013a84fa3d009ef /mac/tkMacScale.c
parentc09bb648b62bbb6099ed35e1aa45f769aaa1c2c7 (diff)
downloadtk-82910603b0e4d9c0fe57e826977e1f63eb12c3f7.zip
tk-82910603b0e4d9c0fe57e826977e1f63eb12c3f7.tar.gz
tk-82910603b0e4d9c0fe57e826977e1f63eb12c3f7.tar.bz2
* generic/tkScale.c:
* generic/tkScale.h: * mac/tkMacScale.c: * unix/tkUnixScale.c: fixed potential segv from patch in 3897
Diffstat (limited to 'mac/tkMacScale.c')
-rw-r--r--mac/tkMacScale.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/mac/tkMacScale.c b/mac/tkMacScale.c
index f3f6fd8..c189e37 100644
--- a/mac/tkMacScale.c
+++ b/mac/tkMacScale.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: tkMacScale.c,v 1.3 1999/05/22 06:35:05 jingham Exp $
+ * RCS: @(#) $Id: tkMacScale.c,v 1.4 1999/12/22 20:01:10 hobbs Exp $
*/
#include "tkScale.h"
@@ -146,7 +146,8 @@ TkpDisplayScale(clientData)
CGrafPtr saveWorld;
GDHandle saveDevice;
MacDrawable *macDraw;
-
+
+ scalePtr->flags &= ~REDRAW_PENDING;
if ((scalePtr->tkwin == NULL) || !Tk_IsMapped(scalePtr->tkwin)) {
goto done;
}
@@ -168,7 +169,7 @@ TkpDisplayScale(clientData)
Tcl_Release((ClientData) interp);
}
scalePtr->flags &= ~INVOKE_COMMAND;
- if (scalePtr->tkwin == NULL) {
+ if (scalePtr->flags & SCALE_DELETED) {
Tcl_Release((ClientData) scalePtr);
return;
}
@@ -183,12 +184,9 @@ TkpDisplayScale(clientData)
if (scalePtr->highlightWidth != 0) {
GC gc;
- if (scalePtr->flags & GOT_FOCUS) {
- gc = Tk_GCForColor(scalePtr->highlightColorPtr, Tk_WindowId(tkwin));
- } else {
- gc = Tk_GCForColor(scalePtr->highlightColorPtr, Tk_WindowId(tkwin));
- }
- Tk_DrawFocusHighlight(tkwin, gc, scalePtr->highlightWidth, Tk_WindowId(tkwin));
+ gc = Tk_GCForColor(scalePtr->highlightColorPtr, Tk_WindowId(tkwin));
+ Tk_DrawFocusHighlight(tkwin, gc, scalePtr->highlightWidth,
+ Tk_WindowId(tkwin));
}
Tk_Draw3DRectangle(tkwin, Tk_WindowId(tkwin), scalePtr->bgBorder,
scalePtr->highlightWidth, scalePtr->highlightWidth,