From cde1ee8fa147dfd15dc5c5b43093cd8c8a402b74 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Wed, 16 Jan 2008 21:54:11 +0000 Subject: 0.41-0 test 11 svn path=/trunk/; revision=9147 --- pd/src/u_main.tk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pd/src/u_main.tk') 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 +] -- cgit v1.2.1