Only close popup in the the hierchary
Imagine following event sequences:
- a tooltip is shown. activePopups = {tooltip}
- user click menu bar to show the menu, QMenu::setVisible is called. now activePopups(tooltip, menu}
- tooltip visibility changed to false.
- closePopups() close both tooltip and menu.
This is a common pattern under wayland that menu is shown as a invisible state. This patch tries to memorize the surface hierchary used to create the popup role. And only close those popups whose ancesotor is hidden.
Pick-to: 6.4 Change-Id: I78aa0b4e32a5812603e003e756d8bcd202e94af4 Reviewed-by: David Edmundson davidedmundson@kde.org (cherry picked from commit f8e3257e)