summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>1999-12-22 20:01:07 (GMT)
committerhobbs <hobbs@noemail.net>1999-12-22 20:01:07 (GMT)
commit25afad71b2b10f837780c68ff2b64c04ef359fbb (patch)
treec3c034b8b2f399802ef45b51f013a84fa3d009ef /mac
parente61313b2ce8313ccbdd99c4357006cbe93ddeed9 (diff)
downloadtk-25afad71b2b10f837780c68ff2b64c04ef359fbb.zip
tk-25afad71b2b10f837780c68ff2b64c04ef359fbb.tar.gz
tk-25afad71b2b10f837780c68ff2b64c04ef359fbb.tar.bz2
* generic/tkScale.c:
* generic/tkScale.h: * mac/tkMacScale.c: * unix/tkUnixScale.c: fixed potential segv from patch in 3897 FossilOrigin-Name: aacfa41407752d13d0f211e542203a0ddcd404c7
Diffstat (limited to 'mac')
-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,