summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tltcl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tltcl')
-rw-r--r--Master/tlpkg/tltcl/tltcl.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/Master/tlpkg/tltcl/tltcl.tcl b/Master/tlpkg/tltcl/tltcl.tcl
index 75e9c12e724..e2fe958f459 100644
--- a/Master/tlpkg/tltcl/tltcl.tcl
+++ b/Master/tlpkg/tltcl/tltcl.tcl
@@ -254,7 +254,8 @@ font configure titlefont -weight bold \
# width of '0', as a very rough estimate of average character width
# assume height == width*2
-set ::cw [font measure TkDefaultFont "0"]
+set ::cw \
+ [expr {max([font measure TkDefaultFont "0"],[font measure TkTextFont "0"])}]
# default foreground color and disabled foreground color
# may not be black in e.g. dark color schemes
@@ -318,6 +319,7 @@ proc create_dlg {wnd {p .}} {
# its upperleft corner will be centered.
proc place_dlg {wnd {p "."}} {
+ update idletasks
set g [wm geometry $p]
scan $g "%dx%d+%d+%d" pw ph px py
set hcenter [expr {$px + $pw / 2}]
@@ -330,8 +332,10 @@ proc place_dlg {wnd {p "."}} {
set wy [expr {$vcenter - $wh / 2}]
if {$wy < 0} { set wy 0}
wm geometry $wnd [format "+%d+%d" $wx $wy]
- wm state $wnd normal
+ update idletasks
+ wm resizable $wnd 0 0 ; # can be overruled later
wm attributes $wnd -topmost
+ wm state $wnd normal
raise $wnd $p
tkwait visibility $wnd
focus $wnd