SUMMARY Not sure, if this is even a kwin bug, or something else. But on my tablet device, when logged into the regular Plasma (Wayland) session, the appmenu of most GTK apps is broken in an awkward way, in that no matter where the appmenu is clicked, the click is always registered on the leftmost item. This is not a huge issue when using a mouse, as hovering over a different item will select it, but when using the touchscreen, this essentially renders GTK appmenus completely unusable (there is a way to focus the correct item with some wizard-like finger movements, but it's incredibly unintuitive and cumbersome). Note that this issue does NOT appear when window decorations are disabled via: [org.kde.kdecoration2] NoPlugin=true As is the default for the mobile session (thus, in the mobile session, these appmenus work just fine). When messing around with the appmenu, the affected app (I used gscan2pdf) spams this in the user journal: Jan 24 17:42:43 nxtab ..gscan2pdf-wra[4552]: Tried to map a popup with a non-top most parent STEPS TO REPRODUCE Sorry, no idea. I'd say get a Microsoft Surface Go 3, install Plasma on it, and give it a try, but this doesn't seem viable. Disabling the touch screen, changing screen orientation, and display scaling doesn't affect this issue however. The only thing that "fixes" it, is disabling window decorations entirely and forcing GTK apps to use CSDs. OBSERVED RESULT Appmenu click is always registered in the top left corner first (presumably) EXPECTED RESULT Appmenu click is registered at the position of the mouse cursor / touch SOFTWARE/OS VERSIONS Linux/KDE Plasma: NixOS (available in About System) KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.113.0 Qt Version: 5.15.12 ADDITIONAL INFORMATION Since this may be difficult to reproduce due to potentially being hardware specific, I'm happy to test any patches or config changes thrown my way.
Uploaded a demo of the bug using a mouse: https://cloud.polskalemon.com/s/teHtPcLJzxdJH68
For me the menu bar in gscan2pdf is a bit weird when using a touchscreen (sometimes I need to click two times on the menu bar for it to do things), but I'm not seeing what you are describing. Not on Plasma 5, 6, or Gnome
Do you also get "Tried to map a popup with a non-top most parent" in your log? As a side note, this only affects GTK apps running under native Wayland. If I force them to run under Xwayland (via GDK_BACKEND=x11), this issue does not present itself.
> Do you also get "Tried to map a popup with a non-top most parent" in your log? yes, and it correlates to the menu being weird. I have also seen it on Gnome
Could be upstream GTK then, I will switch my device over to GNOME this weekend and report back.
Sorry for the long wait. Had a chance to test it on GNOME, and there it works for me as well. Not a surprise though, given that GNOME enforces CSDs, and when used under the plasma mobile shell (which also has CSDs enabled for GTK apps) it also works. I'll wait until Plasma 6 is out and re-test in both the mobile shell and regular plasma shell, and report back.