Bug 473922 - Meta+number does not work on Plasma 6
Summary: Meta+number does not work on Plasma 6
Status: VERIFIED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-08-29 23:05 UTC by Thiago Sueto
Modified: 2023-09-06 17:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!