diff options
Diffstat (limited to 'pd/src/u_main.tk')
-rw-r--r-- | pd/src/u_main.tk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk index 08d429a1..5b9d4e74 100644 --- a/pd/src/u_main.tk +++ b/pd/src/u_main.tk @@ -895,6 +895,17 @@ proc pdtk_canvas_new {name width height geometry editable} { global tcl_version toplevel $name -menu $name.m + # if we're a mac, refuse to make window so big you can't get to + # the resizing control + if {$pd_nt == 2} { + if {$width > [winfo screenwidth $name] - 80} { + set width [expr [winfo screenwidth $name] - 80] + } + if {$height > [winfo screenheight $name] - 80} { + set height [expr [winfo screenheight $name] - 80] + } + } + # slide offscreen windows into view if {$tcl_version >= 8.4} { set geometry [split $geometry +] |