diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | library/tk.tcl | 8 | ||||
-rw-r--r-- | tests/winMenu.test | 14 |
3 files changed, 12 insertions, 15 deletions
@@ -1,3 +1,8 @@ +2004-10-29 Pat Thoyts <patthoyts@users.sourceforge.net> + + * library/tk.tcl (::tk::PlaceWindow): Backported the fix from + #533519 to handle window placement on multi-monitor Windows. + 2004-10-28 Mo DeJong <mdejong@users.sourceforge.net> * doc/wm.n: Add wm attributes . -alpha doc to account 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 diff --git a/tests/winMenu.test b/tests/winMenu.test index 9e79c33..17a690b 100644 --- a/tests/winMenu.test +++ b/tests/winMenu.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: winMenu.test,v 1.6 2002/07/13 20:28:36 dgp Exp $ +# RCS: @(#) $Id: winMenu.test,v 1.6.2.1 2004/10/29 11:16:38 patthoyts Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -1037,15 +1037,3 @@ test winMenu-34.1 {TkpMenuInit called at boot time} {emptyTest pcOnly} {} {} deleteWindows ::tcltest::cleanupTests return - - - - - - - - - - - - |