summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-16 22:23:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-16 22:23:17 (GMT)
commit31f6b36e6e188b6b5c7a5007b15b99100b597bab (patch)
tree9ccfcdb8140291a877a3fa051032fca6560eb29d /library/tk.tcl
parent03ceba547a22b69f50f302e737f783597d7f9276 (diff)
downloadtk-31f6b36e6e188b6b5c7a5007b15b99100b597bab.zip
tk-31f6b36e6e188b6b5c7a5007b15b99100b597bab.tar.gz
tk-31f6b36e6e188b6b5c7a5007b15b99100b597bab.tar.bz2
Fix bug 533519
Diffstat (limited to 'library/tk.tcl')
-rw-r--r--library/tk.tcl20
1 files changed, 8 insertions, 12 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index b9c3872..1935bbc 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -106,20 +106,16 @@ proc ::tk::PlaceWindow {w {place ""} {anchor ""}} {
set windowingsystem [tk windowingsystem]
- if {$windowingsystem eq "win32"} {
- # Bug 533519: win32 multiple desktops may produce negative geometry.
- set checkBounds 0
- }
if {$checkBounds} {
- if {$x < 0} {
- set x 0
- } elseif {$x > ([winfo screenwidth $w]-[winfo reqwidth $w])} {
- set x [expr {[winfo screenwidth $w]-[winfo reqwidth $w]}]
+ if {$x < [winfo vrootx $w]} {
+ set x [winfo vrootx $w]
+ } elseif {$x > ([winfo vrootx $w]+[winfo vrootwidth $w]-[winfo reqwidth $w])} {
+ set x [expr {[winfo vrootx $w]+[winfo vrootwidth $w]-[winfo reqwidth $w]}]
}
- if {$y < 0} {
- set y 0
- } elseif {$y > ([winfo screenheight $w]-[winfo reqheight $w])} {
- set y [expr {[winfo screenheight $w]-[winfo reqheight $w]}]
+ if {$y < [winfo vrooty $w]} {
+ set y [winfo vrooty $w]
+ } elseif {$y > ([winfo vrooty $w]+[winfo vrootheight $w]-[winfo reqheight $w])} {
+ set y [expr {[winfo vrooty $w]+[winfo vrootheight $w]-[winfo reqheight $w]}]
}
if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
# Avoid the native menu bar which sits on top of everything.