summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2004-10-29 11:16:36 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2004-10-29 11:16:36 (GMT)
commit5278e46f9811b59aaf911438e7e64eb1e2f724df (patch)
tree1e4af3bcff77bf1fc8f8ddfde6b5f88c479d84d2 /library/tk.tcl
parent70d54a09579e6ba0eff888157870673a676cfa4c (diff)
downloadtk-5278e46f9811b59aaf911438e7e64eb1e2f724df.zip
tk-5278e46f9811b59aaf911438e7e64eb1e2f724df.tar.gz
tk-5278e46f9811b59aaf911438e7e64eb1e2f724df.tar.bz2
* library/tk.tcl (::tk::PlaceWindow): Backported the fix from
#533519 to handle window placement on multi-monitor Windows.
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