Menu

#604 TMDIChild::EvMDIActivate fails to restore main menu

8
pending
GUI (79)
1
2025-04-23
2025-04-23
No

In some circumstances, TMDIChild::EvMDIActivate fails to restore the main menu:

  1. If the activated child does not have a menu descriptor, the main menu is not restored, leaving the menu as configured for the most recently activated child with a menu descriptor.
  2. If no child is activated (e.g. closing all), the main menu is not restored, unless the current child has a menu descriptor.

Bug 1 is clearly just an oversight. Bug 2 may be an attempt at an optimisation, assuming that there was no merging for a descriptor-less child, so there should be no need to restore anything when deactivating all. However, this does not take into account that the state of the child, in particular whether it has a descriptor or not, may have changed in between activation and deactivation.

These bugs can be observed in the Classes example by commenting out the descriptors for the MDI children with dummy empty descriptors (such as in CmTScroller). Switching between MDI children with or without descriptors will then surface bug 1. Activating a child without descriptor and then closing all (Window | Close All) will surface bug 2.

PS. Note that these bugs have been present since OWL 5, if not longer.

Related

Discussion: Running out of (menu) handles
Wiki: OWLNext_Roadmap_and_Prereleases

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2025-04-23
    • status: open --> pending
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2025-04-23

    A fix for this issue has been implemented on the trunk [r7724] and merged into Owlet [r7725].

     

    Related

    Commit: [r7724]
    Commit: [r7725]


Log in to post a comment.