Bug 411448

Summary: on wayland the appmenu is on a detach window
Product: [Plasma] kwin Reporter: humufr
Component: appmenuAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: 1i5t5.duncan, aspotashev, bugseforuns, kde, nate, sonichedgehog_hyperblast00, zebob.m
Priority: NOR    
Version: 5.16.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: menu was expected to not be detached
Screenshot

Description humufr 2019-08-30 15:16:32 UTC
SUMMARY

On wayland the appmenu dos not have the behaviour expected and is unasable.


STEPS TO REPRODUCE
1. configure the decoration to have the appmenu
2. Click on the appmenu 
3. and try to interact with one of the some items

OBSERVED RESULT

menu is detached on an external windows and it is difficult to interact with it

EXPECTED RESULT

having the menu in the windows and easily used 

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 5.16.4
(available in About System)
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13

ADDITIONAL INFORMATION
Comment 1 Vlad Zahorodnii 2019-08-30 15:33:57 UTC
Can you please provide a screenshot?
Comment 2 humufr 2019-09-03 21:10:48 UTC
Created attachment 122476 [details]
menu was expected to not be detached

by the way, spectacle was not able to take a screenshot of that problem (no possible to take delayed screenshot as one of the problem) so I took it with my phone.
Comment 3 David Edmundson 2019-09-03 21:15:16 UTC
@vlad

xdg_popup menus by protocol definition need to have parent toplevel.

Qt has a "failsafe" that if you create a window of type popup without a parent it will raise it to be a toplevel to be spec compliant.

Neither of that matters as it's in the wrong position anyway.

We can't do internal hacks as the the menu is shown from kded, because (pre-wayland irony) we didn't want kwin to turn into a monolith of having all these things. 


Given showing a remote menu is by definition remote, we could move the menu code into Kwin. Alternatively we could use the plasmashell protocol in kded to explicitly override decorations and set a position.
Comment 4 Patrick Silva 2020-10-16 20:11:54 UTC
*** Bug 426614 has been marked as a duplicate of this bug. ***
Comment 5 Mircea Kitsune 2020-10-16 20:22:44 UTC
Created attachment 132444 [details]
Screenshot

Still an issue in Plasma 5.20.0 / Framework 5.75.0. Here's a screenshot from me which shows the exact difference.
Comment 6 Patrick Silva 2020-11-08 19:28:25 UTC
*** Bug 428820 has been marked as a duplicate of this bug. ***
Comment 7 Duncan 2020-12-01 10:20:42 UTC
Seeing this here on wayland on live-git frameworks/plasma (updated just a few hours ago) too.

A partial workaround is creating a window rule:

Matching:
  Window class:              Exact Match:    kded5 org.kde.kded5
  Match whole window class:                  Yes
  Window type:                               Normal
  Window title:              Exact Match:    KDE Daemon

Size & Position:
  Initial placement:         Force:          Under Mouse


That at least gets the window near where it should be.  However, it still has a titlebar, and the window rule no-titlebar option is buggy, see (my) bug #429168.

Further and I believe related (and not fixed by the above window rule), the menu behavior with a pointer is buggy.  The selection won't reliably stay under the pointer and attempting to navigate to a submenu most often results in both the submenu and original menu closing, forcing a re-click of the appmenu in the titlebar.

To work around that I'm often forced to keyboard-navigate the appmenu, except AFAIK there's no hotkey set and no way to set one to trigger the appmenu itself (alt-F for example to trigger the file submenu may or may not work, depending on the app), so that must be done by pointer-click, after which one can keyboard-navigate.
Comment 8 Nate Graham 2021-03-04 19:44:19 UTC

*** This bug has been marked as a duplicate of bug 430662 ***