summaryrefslogtreecommitdiffstats
path: root/generic/tkFrame.c
diff options
context:
space:
mode:
authorjingham <jingham>1999-08-10 05:04:45 (GMT)
committerjingham <jingham>1999-08-10 05:04:45 (GMT)
commit4904c2fefb18f2f2cc5e3e70d58e1750f52fa659 (patch)
tree7316e518597bb3d84ce7a7a7cabcf5b05832add8 /generic/tkFrame.c
parent1cdd5fb850d1be603e0994761bd0271233c964c4 (diff)
downloadtk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.zip
tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.tar.gz
tk-4904c2fefb18f2f2cc5e3e70d58e1750f52fa659.tar.bz2
New Function: TkpDrawHighlightBorder. Use this in place of Tk_DrawFocusHighlight. The latter did not work on the Mac, since you need to know both foreground & background color when you draw the active focus ring.
Diffstat (limited to 'generic/tkFrame.c')
-rw-r--r--generic/tkFrame.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 9bdee9a..9284deb 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFrame.c,v 1.3 1999/04/16 01:51:14 stanton Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.4 1999/08/10 05:06:01 jingham Exp $
*/
#include "default.h"
@@ -694,7 +694,6 @@ DisplayFrame(clientData)
{
register Frame *framePtr = (Frame *) clientData;
register Tk_Window tkwin = framePtr->tkwin;
- GC gc;
framePtr->flags &= ~REDRAW_PENDING;
if ((framePtr->tkwin == NULL) || !Tk_IsMapped(tkwin)
@@ -711,15 +710,19 @@ DisplayFrame(clientData)
framePtr->borderWidth, framePtr->relief);
}
if (framePtr->highlightWidth != 0) {
+ GC fgGC, bgGC;
+
+ bgGC = Tk_GCForColor(framePtr->highlightBgColorPtr,
+ Tk_WindowId(tkwin));
if (framePtr->flags & GOT_FOCUS) {
- gc = Tk_GCForColor(framePtr->highlightColorPtr,
+ fgGC = Tk_GCForColor(framePtr->highlightColorPtr,
+ Tk_WindowId(tkwin));
+ TkpDrawHighlightBorder(tkwin, fgGC, bgGC, framePtr->highlightWidth,
Tk_WindowId(tkwin));
} else {
- gc = Tk_GCForColor(framePtr->highlightBgColorPtr,
+ TkpDrawHighlightBorder(tkwin, bgGC, bgGC, framePtr->highlightWidth,
Tk_WindowId(tkwin));
}
- Tk_DrawFocusHighlight(tkwin, gc, framePtr->highlightWidth,
- Tk_WindowId(tkwin));
}
}