[applets/appmenu] Hide old menu before showing new menu
ClosedPublic

Authored by cblack on May 5 2020, 11:40 PM.

Details

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.

Diff Detail

Repository
R120 Plasma Workspace
Branch
arcpatch-D29464
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27039
Build 27057: arc lint + arc unit
cblack created this revision.May 5 2020, 11:40 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 5 2020, 11:40 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cblack requested review of this revision.May 5 2020, 11:40 PM

FWIW, I don't notice the flickering behaviour mentioned in the comment.

That focus loss flickering was fixed at some point iirc. I'll try the patch tomororw but lgtm

broulik accepted this revision.May 20 2020, 6:01 AM
This revision is now accepted and ready to land.May 20 2020, 6:01 AM
broulik requested changes to this revision.May 20 2020, 6:11 AM

Oops, I didnt't properly apply the patch. So yeah, the flickering for which I added this code is still there.

This revision now requires changes to proceed.May 20 2020, 6:11 AM
cblack updated this revision to Diff 83083.May 20 2020, 6:19 AM

Only do that on Wayland

broulik accepted this revision.May 20 2020, 6:20 AM
This revision is now accepted and ready to land.May 20 2020, 6:20 AM
cblack closed this revision.May 20 2020, 6:21 AM