#2879 Torn-off sub menus no longer show on XP !

obsolete: 8.6b1.1
closed-fixed
Pat Thoyts
9
2011-03-16
2011-02-14
Thomas MENEZ
No

Regression is in Tk HEAD as of Feb 13, 2011.
Regression also appeared between 8.5.8 and 8.5.9.
Code to reproduce : http://paste.tclers.tk/2356

It appears that
1. Cascaded torn-off menus will not show up anymore when selected with the ------ line;
2. Non cascaded torn-off menus will not show up if their "parent" toplevel is withdrawn.

Looks OK with Linux. XP issue.

Discussion

  • Thomas MENEZ
    Thomas MENEZ
    2011-02-14

    Sample code

     
    Attachments
  • Thomas MENEZ
    Thomas MENEZ
    2011-02-14

    • priority: 5 --> 9
    • assigned_to: tmh --> patthoyts
     
  • Pat Thoyts
    Pat Thoyts
    2011-03-16

    The commit of 3-Jan-2010 "tearoff menus should be transient and use the toolwindow style on Windows" sets the torn off menu toplevel to be transient to avoid adding application entries to the taskbar along with setting the window type to toolwindow. Menu's have an odd hidden window hierarchy which confuses [winfo toplevel] so that the assigned toplevel for the transient command ends up being an unmapped hidden menu. As the owner is unmapped, the transient is unmapped resulting in the bug seen here.
    To fix, we exclude parents that are toplevels but also have a Menu class so that we find the first 'real' toplevel to be transient for.

     
  • Pat Thoyts
    Pat Thoyts
    2011-03-16

    Applied to core-8-5-branch and trunk (see http://core.tcl.tk/tk )

     
  • Pat Thoyts
    Pat Thoyts
    2011-03-16

    • status: open --> closed-fixed