Bug 473922

Summary: Meta+number does not work on Plasma 6
Product: [Plasma] plasmashell Reporter: Thiago Sueto <herzenschein>
Component: Task Manager and Icons-Only Task ManagerAssignee: Plasma Bugs List <plasma-bugs>
Status: VERIFIED FIXED    
Severity: major CC: nate, qydwhotmail
Priority: NOR Keywords: qt6
Version: master   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=474228
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thiago Sueto 2023-08-29 23:05:03 UTC
Trying to open/go to applications pinned to the panel does not work with the Meta/Super/Win + number shortcut.

Running:

qdbus6 org.kde.kglobalaccel /component/plasmashell org.kde.kglobalaccel.Component.invokeShortcut "activate task manager entry 1"

Also does not work, for any entry, despite the fact that something like:

qdbus6 org.kde.kglobalaccel /component/plasmashell org.kde.kglobalaccel.Component.invokeShortcut "show-on-mouse-pos"

Does work.

I also noticed that the new kglobalacceld is not actually running as a systemd service or directly from the command line, it just exits normally immediately after execution, with no stdout.

systemctl status --user plasma-kglobalaccel.service (which is supposed to run kglobalacceld) says Active: inactive (dead), despite its logs saying:

Starting KDE Global Shortcuts Server...
Started KDE Global Shortcuts Server.

Deleting kglobalshortcutsrc, khotkeysrc or kwinrc and restarting makes no difference.

This is from Plasma 6 compiled with kdesrc-build yesterday (28/08). I compiled both kglobalaccel and kglobalacceld for good measure, no difference.

I'm not sure if this is a bug in plasmashell or kglobalacceld.
Comment 1 Nate Graham 2023-08-30 16:39:39 UTC
Can reproduce.
Comment 2 Nate Graham 2023-08-30 17:11:49 UTC
Found the problem. On this line of code: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/shell/shellcorona.cpp?ref_type=heads#L2499

....we're getting -1, instead of it correctly finding the method. My theory is that the method signature changed and maybe the argument for activateTaskAtIndex(index) isn't typed as a QVariant anymore. But I can't find any documentation on what it might be (or was) and naively changing it to look for a method with an int doesn't fix it. In this cases, JavaScript's dynamically typed nature is being annoying.

Giving up for now; hopefully someone more experienced than me can fix this.
Comment 3 Marco Martin 2023-09-06 15:59:30 UTC
Git commit b9c139c441b1a10fa7d6433860cad01272e4d82f by Marco Martin.
Committed on 06/09/2023 at 17:59.
Pushed by mart into branch 'master'.

call activateTaskAtIndex on the proper object

now the appletinterface is the plasmoid root object and is the one which
provides the activateTaskAtIndex function, so don't iterate on its
children anymore

M  +13   -20   shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/b9c139c441b1a10fa7d6433860cad01272e4d82f
Comment 4 Nate Graham 2023-09-06 16:14:23 UTC
Confirming the fix!