Created attachment 163625 [details] Menus when holding left mouse button SUMMARY If the left mouse button is pressed down (in a menu bar, for example), a context menu will show up. With the mouse button still pressed, hovering over menu items should highlight them. Releasing the mouse button over highlighted menu items should activate them. This doesn't work on KDE Plasma Wayland session. Works on X11, in Gnome, Weston, and in other OS'es. STEPS TO REPRODUCE 1. Launch "GDK_BACKEND=wayland gtk3-demo" 2. Run "Menus" demo 3. Press and hold left mouse button over one of the menu bar items 4. The menu appears, but try to hover over its items - it's not interactive OBSERVED RESULT Menu items are not interactive EXPECTED RESULT Menu items can be highlighted when hovering over them with the mouse button held down, and activated when releasing the mouse button. SOFTWARE/OS VERSIONS Distro: Ubuntu 23.10 KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10
This is one of the blockers for native Wayland support in KiCad: disambiguation menu is activated by long mouse button press and hold, which isn't interactive due to this bug. Also reported in wxWidgets: https://github.com/wxWidgets/wxWidgets/issues/23942
Can reproduce. Does work with `GDK_BACKEND=x11 gtk3-demo`
The reason this works on other compositors is that they send a wl_pointer.leave event on the parent window surface, and an enter event for the popup. KWin instead sees that the parent window surface has an implicit pointer grab (buttons are pressed) and blocks passing pointer focus to other surfaces. How this works with Qt applications is that Qt has special logic to send pointer events to the correct surface... bad news though is that fixing this breaks Qt's assumptions about implicit grabs, and thus breaks the exact same feature there.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7359