Skip to content

Improve titlebar appmenu on Wayland

David Redondo requested to merge work/davidre/appmenuinvis into master

Until now the first level menu was a toplevel, the second level proper popups. While visually working this design had two major issues. The UX is different comapred to what is expected and to normal menus and more importantly the toplevel takes focus away from the app window which causes some apps to not react to triggered actions anymore. This patch uses an invisible toplevel window to serve as parent for the menu which makes it act exactly the same as a normal menu would. In addition it is made to not take focus via the plasmashell protocol. (Making the first level menu toplevel not take focus in the previous design wouldnt work because it breaks the UX even more as arrow keys and accelerators wouldn't work anymore.) This also changes the way we inject fake serials to QtWayland because they are now needed for the first level of the menu. While before the enter serial to the first menu was used, now a fake one is set (any only if noone was ever set). But this doesn't change really anything as while before it was still some kind of serial it was one of the wrong kind not referring to an implicit grab as is expected when creating a grabbing popup. BUG:490590

Edited by David Redondo

Merge request reports