Commit 5988ee21 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

improved window placement logic of new pd windows

parent 5992d6be
......@@ -2253,6 +2253,9 @@ proc pdtk_canvas_new {name width height geometry editable} {
# slide offscreen windows into view
if {$tcl_version >= 8.4} {
set geometry [split $geometry +]
if { $pd_nt == 0 && [lindex $geometry 2] == 0 } {
after idle center_window $name [expr int(-$width/3)] [expr int(-$height/3)]
}
set i 1
foreach geo {width height} {
set screen($geo) [winfo screen$geo .]
......@@ -2266,7 +2269,7 @@ proc pdtk_canvas_new {name width height geometry editable} {
if { $pd_nt == 2 && [lindex $geometry 2] < 22 } {
lset geometry 2 22
}
set geometry [join $geometry +]
set geometry [join $geometry +]
}
#apply window properties
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment