BR: Menus don't disappear when app minimized

Menus don’t disappear when app minimized, they just remain floating on the screen. Also, they aren’t attached to parent window, so parent window moves, and menu is left behind.

Here is a reviewer showing the issue and complaining about it:

I’d like to add that I tried to work around this by using Component::minimisationStateChanged to call PopupMenu::dismissAllActiveMenus() but because the callback happens after the app has been minimised, when the menu is dismissed, it ends the modal callback which re-focuses the app and maximises it again which is probably not expected either.

Thanks for reporting. I’ve made some changes in the ComponentPeer classes which should make PopupMenus automatically dismiss when windows are minimised, moved, and resized:

This should resolve the issue, but let us know if you run into any problems with the patches.