Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rishabh Gupta
purr-data
Commits
5988ee21
Commit
5988ee21
authored
Mar 30, 2013
by
Ivica Bukvic
Browse files
improved window placement logic of new pd windows
parent
5992d6be
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/pd.tk
View file @
5988ee21
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment