https://bugs.kde.org/show_bug.cgi?id=527810

--- Comment #18 from Fushan Wen <[email protected]> ---
Git commit 31530cf85e244bdecc4c7e8af95f380f75bc43e7 by Fushan Wen.
Committed on 01/11/2026 at 13:41.
Pushed by fusionfuture into branch 'master'.

shell: Add autotest for activateLauncherMenu ordering

activateLauncherMenu() sorts the containments with a comparator that must
be a strict weak ordering: once there are more than a handful of
containments std::sort stops using insertion sort, and a comparator that
is not a strict weak ordering is undefined behaviour. That made the shell
segfault when opening the launcher with a keyboard shortcut on setups
with several screens and panels (BUG 527810).

Add a test that puts launchers on two screens among enough containments
to cross that threshold, then triggers the public activateLauncherMenu()
slot, which is the same path the shortcut takes. It checks that the
launcher on the active screen is the one that gets activated, that the
active screen wins over the id ordering, and that among the launchers on
the active screen the one with the lowest id is preferred.

A  +23   -0    shell/autotests/data/testlauncher/contents/ui/main.qml    
[License: GPL(v2.0+)]
A  +23   -0    shell/autotests/data/testlauncher/metadata.json
M  +68   -0    shell/autotests/shelltest.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/31530cf85e244bdecc4c7e8af95f380f75bc43e7

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to