diff options
author | hobbs <hobbs> | 2006-09-06 22:01:24 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2006-09-06 22:01:24 (GMT) |
commit | c1e05e3afb76356ef8e2d5af2a2ce3660c6bee48 (patch) | |
tree | 983074bdc91b005de21970a3ec98bae0c6d5af63 /generic/tkEntry.c | |
parent | 87caa3a60c4200a5a79707791643a555407a1271 (diff) | |
download | tk-c1e05e3afb76356ef8e2d5af2a2ce3660c6bee48.zip tk-c1e05e3afb76356ef8e2d5af2a2ce3660c6bee48.tar.gz tk-c1e05e3afb76356ef8e2d5af2a2ce3660c6bee48.tar.bz2 |
* generic/tkEntry.c: move hard-coded ALWAYS_SHOW_SELECTION
* generic/tkInt.h: control of entry/text selection display
* generic/tkText.c: based on focus to the Tcl level,
* generic/tkTextBTree.c: controlled by ::tk::AlwaysShowSelection
* generic/tkTextDisp.c: (boolean, private). [Bug 1553691]
* generic/tkWindow.c:
* library/tk.tcl
* unix/tkUnixPort.h:
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 2894686..f98f446 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.1 2005/03/25 04:34:16 wolfsuit Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.35.2.2 2006/09/06 22:01:25 hobbs Exp $ */ #include "tkInt.h" @@ -1658,11 +1658,11 @@ DisplayEntry(clientData) * don't have the focus. */ -#ifdef ALWAYS_SHOW_SELECTION - showSelection = 1; -#else - showSelection = (entryPtr->flags & GOT_FOCUS); -#endif + if (TkpAlwaysShowSelection(entryPtr->tkwin)) { + showSelection = 1; + } else { + showSelection = (entryPtr->flags & GOT_FOCUS); + } /* * Draw the background in three layers. From bottom to top the @@ -2838,16 +2838,16 @@ EntryLostSelection(clientData) /* * On Windows and Mac systems, we want to remember the selection * for the next time the focus enters the window. On Unix, we need - * to clear the selection since it is always visible. + * to clear the selection since it is always visible. This is + * controlled by ::tk::AlwaysShowSelection. */ -#ifdef ALWAYS_SHOW_SELECTION - if ((entryPtr->selectFirst >= 0) && entryPtr->exportSelection) { + if (TkpAlwaysShowSelection(entryPtr->tkwin) + && (entryPtr->selectFirst >= 0) && entryPtr->exportSelection) { entryPtr->selectFirst = -1; entryPtr->selectLast = -1; EventuallyRedraw(entryPtr); } -#endif } /* |