Bug 491815 - Menu rolling in plasmashell context menus does not work on wayland
Summary: Menu rolling in plasmashell context menus does not work on wayland
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability, wayland-only
: 477201 492912 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-17 11:15 UTC by sajito+kde
Modified: 2024-10-22 13:53 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: Qt 6.8.0
Sentry Crash Report:


Attachments
Menu rolling still not working 100% (1.57 MB, video/mp4)
2024-10-15 20:15 UTC, sajito+kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sajito+kde 2024-08-17 11:15:39 UTC
SUMMARY
Holding the right mouse button, then moving to a context menu entry and releasing the button, usually allows to quickly select an entry from the context menu.
On X11 this works everywhere, even inside the plasmashell. Under Wayland this does not work for anything in the plasmashell. Neither on the desktop, nor on the panels or widgets. One has to release the button, before being able to select an entry.

STEPS TO REPRODUCE
1. Press and hold right mouse button on the desktop
2. Drag mouse over any entry
3. Release

OBSERVED RESULT
While dragging no entry in the context menu is getting highlighted. Releasing the mouse button then does not select anything.

EXPECTED RESULT
The hovered entry should be highlighted and be selected when releasing the mouse button.

SOFTWARE/OS VERSIONS
Operating System: Garuda Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Comment 1 Nate Graham 2024-08-20 17:24:12 UTC
Can reproduce.
Comment 2 Nate Graham 2024-09-19 19:12:14 UTC
*** Bug 492912 has been marked as a duplicate of this bug. ***
Comment 3 reports_go_brrr 2024-09-28 21:55:36 UTC
Funnily enough, after updating to 6.1.90 the problem was solved for me.

Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.8.0
Kernel Version: 6.10.7-arch1-1 (64-bit)
Comment 4 Luke Horwell 2024-10-01 16:27:37 UTC
*** Bug 477201 has been marked as a duplicate of this bug. ***
Comment 5 Luke Horwell 2024-10-01 17:04:13 UTC
Just to note, this regressed under X11 too when Qt 6.7.3 was released. The problematic commit was found and reverting fixes it again for X11. Even though the bug found isn't the same as our menu rolling issue, it was related to how Qt handles input.

https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-base/-/issues/6
https://bugreports.qt.io/browse/QTBUG-129509
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9c1f39b93e6fd5261da4324d17a5ecd40db5f05b

Still non-functional under Wayland with the current stable releases, for now!
Comment 6 David Redondo 2024-10-14 08:17:42 UTC
reproducer:

import QtQuick
import org.kde.plasma.extras as PlasmaExtras

Window {
    visible: true
    PlasmaExtras.Menu {
        id: menu
        PlasmaExtras.MenuItem {
            text: "foo"
        }
        PlasmaExtras.MenuItem {
            text: "foo"
        }
        PlasmaExtras.MenuItem {
            text: "foo"
        }
        PlasmaExtras.MenuItem {
            text: "foo"
        }
    }
    MouseArea {
        anchors.fill: parent
        acceptedButtons: Qt.RightButton
        onPressed: mouse => menu.open(mouse.x, mouse.y)
    }
}
Comment 7 David Redondo 2024-10-14 09:22:36 UTC
I can reproduce in Qt 6.7 + breeze and Qt 6.7 and fusion but not with QT dev + fusion
Comment 8 David Redondo 2024-10-14 10:40:52 UTC
Confirmed fixed upstream by https://invent.kde.org/qt/qt/qtbase/-/commit/e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9 (Qt 6.8)
Comment 9 sajito+kde 2024-10-15 20:15:32 UTC
Created attachment 174859 [details]
Menu rolling still not working 100%

Unless I need more than just the Qt 6.8 update, I'm afraid it's not fully fixed yet.
The selection entries are now highlighted on hover, but releasing the mouse button does not select the hovered element.
In applications like dolphin this works as expected (it worked even before Qt 6.8 there).
See the screen recording.
Comment 10 David Redondo 2024-10-18 06:52:58 UTC
That's my fault, I tested wrong, since highlighting was not working, I didnt imagine activating would be broken once selecting works
Comment 11 David Redondo 2024-10-22 11:55:14 UTC
I tested Qt dev, Qt 6.8 and Qt 6.8.0 it works. 

Another plasma devs tested this on their machines with Qt 6.8 and it works there as well. Not sure what's going on for your.
Comment 12 Nate Graham 2024-10-22 13:53:28 UTC
Can also confirm it's fixed in Qt 6.8.0 — at least the version that comes with Arch, as tested using KDE Linux.