summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@noemail.net>2004-10-29 11:16:36 (GMT)
committerpatthoyts <patthoyts@noemail.net>2004-10-29 11:16:36 (GMT)
commit328c5fe52af8cb05b18d935b0360d02ea55092a7 (patch)
tree1e4af3bcff77bf1fc8f8ddfde6b5f88c479d84d2 /library/tk.tcl
parent3bfdea37827b4407a0eddb72db30685086d9c19f (diff)
downloadtk-328c5fe52af8cb05b18d935b0360d02ea55092a7.zip
tk-328c5fe52af8cb05b18d935b0360d02ea55092a7.tar.gz
tk-328c5fe52af8cb05b18d935b0360d02ea55092a7.tar.bz2
* library/tk.tcl (::tk::PlaceWindow): Backported the fix from
#533519 to handle window placement on multi-monitor Windows. FossilOrigin-Name: a9eeca37765b1d10085115feddd30c4a4511d1a4
Diffstat (limited to 'library/tk.tcl')
-rw-r--r--library/tk.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index 0d5b2ed..57c6926 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.46.2.1 2003/10/28 15:59:34 dkf Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.46.2.2 2004/10/29 11:16:37 patthoyts Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -79,7 +79,7 @@ proc ::tk::PlaceWindow {w {place ""} {anchor ""}} {
wm withdraw $w
update idletasks
set checkBounds 1
- if {[string equal $place ""]} {
+ if {$place eq ""} {
set x [expr {([winfo screenwidth $w]-[winfo reqwidth $w])/2}]
set y [expr {([winfo screenheight $w]-[winfo reqheight $w])/2}]
set checkBounds 0
@@ -104,6 +104,10 @@ proc ::tk::PlaceWindow {w {place ""} {anchor ""}} {
set y [expr {([winfo screenheight $w]-[winfo reqheight $w])/2}]
set checkBounds 0
}
+ if {[tk windowingsystem] eq "win32"} {
+ # Bug 533519: win32 multiple desktops may produce negative geometry.
+ set checkBounds 0
+ }
if {$checkBounds} {
if {$x < 0} {
set x 0