Skip to content

Only close popup in the the hierchary

Xuetian Weng requested to merge xuetianweng/qtwayland:work/popup-fix into kde/5.15

Imagine following event sequences:

  1. a tooltip is shown. activePopups = {tooltip}
  2. user click menu bar to show the menu, QMenu::setVisible is called. now activePopups(tooltip, menu}
  3. tooltip visibility changed to false.
  4. 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)

Merge request reports