diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-16 22:23:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-16 22:23:17 (GMT) |
commit | 31f6b36e6e188b6b5c7a5007b15b99100b597bab (patch) | |
tree | 9ccfcdb8140291a877a3fa051032fca6560eb29d /library/dialog.tcl | |
parent | 03ceba547a22b69f50f302e737f783597d7f9276 (diff) | |
download | tk-31f6b36e6e188b6b5c7a5007b15b99100b597bab.zip tk-31f6b36e6e188b6b5c7a5007b15b99100b597bab.tar.gz tk-31f6b36e6e188b6b5c7a5007b15b99100b597bab.tar.bz2 |
Fix bug 533519
Diffstat (limited to 'library/dialog.tcl')
-rw-r--r-- | library/dialog.tcl | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/library/dialog.tcl b/library/dialog.tcl index 04acb3b..1ec578e 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -152,27 +152,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. |