diff options
Diffstat (limited to 'library/dialog.tcl')
-rw-r--r-- | library/dialog.tcl | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/library/dialog.tcl b/library/dialog.tcl index 162ecbe..adea259 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -3,8 +3,6 @@ # This file defines the procedure tk_dialog, which creates a dialog # box containing a bitmap, a message, and one or more buttons. # -# RCS: @(#) $Id: dialog.tcl,v 1.26 2010/01/19 01:27:41 patthoyts Exp $ -# # Copyright (c) 1992-1993 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -148,27 +146,9 @@ proc ::tk_dialog {w title text bitmap default args} { # 6. Withdraw the window, then update all the geometry information # so we know how big it wants to be, then center the window in the - # display and de-iconify it. - - wm withdraw $w - update idletasks - set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \ - - [winfo vrootx [winfo parent $w]]}] - set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - - [winfo vrooty [winfo parent $w]]}] - # Make sure that the window is on the screen and set the maximum - # size of the window is the size of the screen. That'll let things - # fail fairly gracefully when very large messages are used. [Bug 827535] - if {$x < 0} { - set x 0 - } - if {$y < 0} { - set y 0 - } - wm maxsize $w [winfo screenwidth $w] [winfo screenheight $w] - wm geometry $w +$x+$y - wm deiconify $w + # display (Motif style) and de-iconify it. + ::tk::PlaceWindow $w tkwait visibility $w # 7. Set a grab and claim the focus too. |