Tk Source Code

View Ticket
Login
Ticket UUID: 726351
Title: Toplevel menu doesn't request height.
Type: Bug Version: obsolete: 8.4.2
Submitter: nobody Created on: 2003-04-23 16:37:55
Subsystem: 12. Unix Menus Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-16 10:24:13
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2026-10-16 10:24:13
Description:
Has been observed with Linux + KDE and Linux + 
WindowMaker.

[code]
global var lbvar
set lbvar 
{}
listbox .lstbx -height 20 -listvar lbvar
for {set z 0} {$z < 19} 
{incr z} {lappend lbvar $z}
lappend lbvar "Try to make me 
smaller"
pack .lstbx

if {$argc} {
 menu .foo
 .foo 
add cascade -label "Bar" -menu .bar
 menu .bar -type normal -
tearoff 0
 .bar add command -label "Barian" -command {}
 . 
configure -menu .foo
}

update

wm minsize . 
[winfo reqwidth .] [winfo reqheight .]
[/code]
User Comments: jan.nijtmans added on 2026-10-16 10:23:58:

Fixed in [b278695b2bed055c|trunk], backported to core-9-0-branch and core-8-6-branch

Many thanks!


serhiy.storchaka added on 2026-09-22 18:44:00:

Still present in 9.1b1 on X11. The size hints are set for the wrapper window, which is higher than the toplevel by the height of the menubar, but UpdateSizeHints() passed wm minsize and wm maxsize on unchanged, so both limits are wrong by that height. Windows includes the menu bar in its limits and is not affected.

Fixed on branch x11-menubar-size-hints in [2de1c03683], so X11 now behaves like Windows. Test unixWm-63.1.


tmh added on 2003-09-03 03:20:44:
Logged In: YES 
user_id=92123

Confirmed, I was able to reproduce this on redhat9->wish8.3
and solaris9->wish8.4 & wish8.5a0