diff options
author | dkf <dkf@noemail.net> | 2009-12-11 15:32:36 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-12-11 15:32:36 (GMT) |
commit | 69d4c132eb36acbee2d568ccf18434d91bf37d99 (patch) | |
tree | e90f23cb34e026ac3c6de406926db0a10afb611c /library | |
parent | 40a40b5f139a32209a2176846de8f0c6b729756e (diff) | |
download | tk-69d4c132eb36acbee2d568ccf18434d91bf37d99.zip tk-69d4c132eb36acbee2d568ccf18434d91bf37d99.tar.gz tk-69d4c132eb36acbee2d568ccf18434d91bf37d99.tar.bz2 |
Simplified this code following observation by Brian Griffin
FossilOrigin-Name: d46af7fa7ad88ad810a1707fd8bb98492c74cf83
Diffstat (limited to 'library')
-rw-r--r-- | library/tk.tcl | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/library/tk.tcl b/library/tk.tcl index 25a6d13..e950c24 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -3,7 +3,7 @@ # Initialization script normally executed in the interpreter for each Tk-based # application. Arranges class bindings for widgets. # -# RCS: @(#) $Id: tk.tcl,v 1.87 2009/12/11 11:17:28 dkf Exp $ +# RCS: @(#) $Id: tk.tcl,v 1.88 2009/12/11 15:32:36 dkf Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -246,12 +246,8 @@ if {$tcl_platform(platform) eq "unix"} { # screen - The name of the new screen. proc ::tk::ScreenChanged screen { - set x [string last . $screen] - if {$x > 0} { - set disp [string range $screen 0 [expr {$x - 1}]] - } else { - set disp $screen - } + # Extract the display name. + set disp [string range $screen 0 [string last . $screen]-1] # Ensure that namespace separators never occur in the display name (as # they cause problems in variable names). Double-colons exist in some VNC |