[applets/appmenu] Hide old menu before showing new menu
Summary:
Hiding the old menu after the new menu is shown isn't possible on Wayland:
qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x17dd550) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x120d9f0) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
Test Plan:
Before, Wayland: Trying to open a menu under Wayland while one is already open fails.
After, Wayland: Trying to open a menu under Wayland while one is already open succeeds.
Ensure no regressions on X11.
Reviewers: Plasma, KWin, broulik
Reviewed By: Plasma, broulik
Subscribers: broulik, plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D29464