summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixButton.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-08-14 12:30:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-08-14 12:30:11 (GMT)
commit1ea6a2802aa9cad7de2d34747034400617e51c34 (patch)
treea0993c8ba95537dbcf5674ddc3d90f21971488ad /unix/tkUnixButton.c
parent5586adc5a179b62eb9f3cd1c260e8fda97f85c2f (diff)
downloadtk-1ea6a2802aa9cad7de2d34747034400617e51c34.zip
tk-1ea6a2802aa9cad7de2d34747034400617e51c34.tar.gz
tk-1ea6a2802aa9cad7de2d34747034400617e51c34.tar.bz2
Make test suite pass without crashes from TIP#109 changes...
Diffstat (limited to 'unix/tkUnixButton.c')
-rw-r--r--unix/tkUnixButton.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 4fb3b9e..e4f7fe7 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.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: tkUnixButton.c,v 1.14 2003/08/14 10:31:14 dkf Exp $
+ * RCS: @(#) $Id: tkUnixButton.c,v 1.15 2003/08/14 12:30:11 dkf Exp $
*/
#include "tkButton.h"
@@ -599,23 +599,31 @@ TkpDisplayButton(clientData)
if ((butPtr->type == TYPE_CHECK_BUTTON) && butPtr->indicatorOn) {
if (butPtr->indicatorDiameter > 2*butPtr->borderWidth) {
TkBorder *selBorder = (TkBorder *) butPtr->selectBorder;
+ XColor *selColor = NULL;
+ if (selBorder != NULL) {
+ selColor = selBorder->bgColorPtr;
+ }
x -= butPtr->indicatorSpace/2;
y = Tk_Height(tkwin)/2;
- TkpDrawCheckIndicator(tkwin, butPtr->display, pixmap,
- x, y, border, butPtr->normalFg, selBorder->bgColorPtr,
- butPtr->disabledFg, (butPtr->flags & SELECTED),
+ TkpDrawCheckIndicator(tkwin, butPtr->display, pixmap, x, y,
+ border, butPtr->normalFg, selColor, butPtr->disabledFg,
+ (butPtr->flags & SELECTED),
(butPtr->state == STATE_DISABLED), CHECK_BUTTON);
}
} else if ((butPtr->type == TYPE_RADIO_BUTTON) && butPtr->indicatorOn) {
if (butPtr->indicatorDiameter > 2*butPtr->borderWidth) {
TkBorder *selBorder = (TkBorder *) butPtr->selectBorder;
+ XColor *selColor = NULL;
+ if (selBorder != NULL) {
+ selColor = selBorder->bgColorPtr;
+ }
x -= butPtr->indicatorSpace/2;
y = Tk_Height(tkwin)/2;
- TkpDrawCheckIndicator(tkwin, butPtr->display, pixmap,
- x, y, border, butPtr->normalFg, selBorder->bgColorPtr,
- butPtr->disabledFg, (butPtr->flags & SELECTED),
+ TkpDrawCheckIndicator(tkwin, butPtr->display, pixmap, x, y,
+ border, butPtr->normalFg, selColor, butPtr->disabledFg,
+ (butPtr->flags & SELECTED),
(butPtr->state == STATE_DISABLED), RADIO_BUTTON);
}
}