diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkEntry.c | 10 | ||||
-rw-r--r-- | generic/tkText.c | 13 | ||||
-rw-r--r-- | generic/tkTextBTree.c | 10 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 10 |
4 files changed, 34 insertions, 9 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index f98f446..60cbdcf 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEntry.c,v 1.35.2.2 2006/09/06 22:01:25 hobbs Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.35.2.3 2006/09/10 17:07:35 das Exp $ */ #include "tkInt.h" @@ -1700,7 +1700,13 @@ DisplayEntry(clientData) baseY - fm.ascent - entryPtr->selBorderWidth, (selEndX - selStartX) + 2*entryPtr->selBorderWidth, (fm.ascent + fm.descent) + 2*entryPtr->selBorderWidth, - entryPtr->selBorderWidth, TK_RELIEF_RAISED); + entryPtr->selBorderWidth, +#ifndef MAC_OSX_TK + TK_RELIEF_RAISED +#else + MAC_OSX_ENTRY_SELECT_RELIEF +#endif + ); } } diff --git a/generic/tkText.c b/generic/tkText.c index 33edca7..750d0d8 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.c,v 1.33.2.3 2006/09/06 22:01:25 hobbs Exp $ + * RCS: @(#) $Id: tkText.c,v 1.33.2.4 2006/09/10 17:07:35 das Exp $ */ #include "default.h" @@ -426,7 +426,7 @@ Tk_TextCmd(clientData, interp, argc, argv) textPtr->selTagPtr->reliefString = (char *) ckalloc(sizeof(DEF_TEXT_SELECT_RELIEF)); strcpy(textPtr->selTagPtr->reliefString, DEF_TEXT_SELECT_RELIEF); - textPtr->selTagPtr->relief = TK_RELIEF_RAISED; + Tk_GetRelief(interp, DEF_TEXT_SELECT_RELIEF, &(textPtr->selTagPtr->relief)); textPtr->currentMarkPtr = TkTextSetMark(textPtr, "current", &startIndex); textPtr->insertMarkPtr = TkTextSetMark(textPtr, "insert", &startIndex); @@ -1281,7 +1281,14 @@ TextEventProc(clientData, eventPtr) textPtr->flags &= ~(GOT_FOCUS | INSERT_ON); textPtr->insertBlinkHandler = (Tcl_TimerToken) NULL; } - if (!TkpAlwaysShowSelection(textPtr->tkwin)) { + if ( +#ifndef MAC_OSX_TK + !TkpAlwaysShowSelection(textPtr->tkwin) +#else + /* Don't show inactive selection in disabled widgets. */ + textPtr->state != TK_STATE_DISABLED +#endif + ) { TkTextRedrawTag(textPtr, NULL, NULL, textPtr->selTagPtr, 1); } TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index); diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 5c4069e..c2a5fbd 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextBTree.c,v 1.6.2.2 2006/09/06 22:01:25 hobbs Exp $ + * RCS: @(#) $Id: tkTextBTree.c,v 1.6.2.3 2006/09/10 17:07:35 das Exp $ */ #include "tkInt.h" @@ -2551,7 +2551,13 @@ TkTextIsElided(textPtr, indexPtr) for (i = numTags-1; i >=0; i--) { if (tagCnts[i] & 1) { /* who would make the selection elided? */ - if (!TkpAlwaysShowSelection(textPtr->tkwin) + if ( +#ifndef MAC_OSX_TK + !TkpAlwaysShowSelection(textPtr->tkwin) +#else + /* Don't show inactive selection in disabled widgets. */ + textPtr->state == TK_STATE_DISABLED +#endif && (tagPtr == textPtr->selTagPtr) && !(textPtr->flags & GOT_FOCUS)) { continue; diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index e13766e..ab0a8cf 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextDisp.c,v 1.14.2.3 2006/09/06 22:01:26 hobbs Exp $ + * RCS: @(#) $Id: tkTextDisp.c,v 1.14.2.4 2006/09/10 17:07:35 das Exp $ */ #include "tkPort.h" @@ -550,7 +550,13 @@ GetStyle(textPtr, indexPtr) * unless we always want to show the selection. */ - if (!TkpAlwaysShowSelection(textPtr->tkwin) + if ( +#ifndef MAC_OSX_TK + !TkpAlwaysShowSelection(textPtr->tkwin) +#else + /* Don't show inactive selection in disabled widgets. */ + textPtr->state == TK_STATE_DISABLED +#endif && (tagPtr == textPtr->selTagPtr) && !(textPtr->flags & GOT_FOCUS)) { continue; |