Bug 437034 - kglobalaccel has stopped working completely in non-KDE desktops
Summary: kglobalaccel has stopped working completely in non-KDE desktops
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.82.0
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-05-13 11:17 UTC by Martin Sandsmark
Modified: 2021-06-07 16:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.83


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Sandsmark 2021-05-13 11:17:45 UTC
Noticed that Mangonel (which I somehow ended up maintaining) suddenly stopped working (i. e. is impossible to get to show up).

KGlobalAccel::shortcut() started returning an empty list, even when passed a default shortcut. I can still see the shortcut being assigned in kglobalshortcutsrc.

It worked just one update ago. Complete function loss of the only purpose for a framework library is what I'd consider critical, hence the severity.
Comment 1 Martin Sandsmark 2021-05-13 11:35:24 UTC
Adding Nicolas, which my magic git-owner script tells me has changed most in the repo.
Comment 2 Martin Sandsmark 2021-05-13 12:42:48 UTC
Git commit 7c47b585cdd2c753225b6c1fa828d6e44a346d3b by Martin T. H. Sandsmark.
Committed on 13/05/2021 at 12:42.
Pushed by sandsmark into branch 'master'.

Port away from KGlobalAccel, so Mangonel at least works

M  +38   -9    CMakeLists.txt
M  +39   -17   Mangonel.cpp
M  +3    -0    Mangonel.h
A  +6    -0    globalshortcut/COPYING
A  +510  -0    globalshortcut/LICENSE
A  +97   -0    globalshortcut/qglobalshortcut.cpp  *
A  +51   -0    globalshortcut/qglobalshortcut.h  *
A  +19   -0    globalshortcut/qglobalshortcut_macx.cpp  *
A  +115  -0    globalshortcut/qglobalshortcut_win.cpp  *
A  +140  -0    globalshortcut/qglobalshortcut_x11.cpp  *

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/utilities/mangonel/commit/7c47b585cdd2c753225b6c1fa828d6e44a346d3b
Comment 3 Nate Graham 2021-05-13 17:12:35 UTC
That seems a little bit of a drastic step...
Comment 4 Nicolas Fella 2021-05-13 17:14:08 UTC
What desktop are you using? If it's not Plasma then this is intentional since kglobalaccel interferes with other shortcut daemons
Comment 5 Chiitoo 2021-05-13 17:36:39 UTC
Probably commit 48c3376927e [1]?

It pretty much breaks KWin for me when running it with LXQt (haven't noticed anything going wrong there).

1. https://invent.kde.org/frameworks/kglobalaccel/-/commit/48c3376927e5e9c13377bf3cfc8b0c411783e7f3
Comment 6 Chiitoo 2021-05-13 17:38:31 UTC
(In reply to Chiitoo from comment #5)
> Probably commit 48c3376927e [1]?
> 
> It pretty much breaks KWin for me when running it with LXQt (haven't noticed
> anything going wrong there).
> 
> 1.
> https://invent.kde.org/frameworks/kglobalaccel/-/commit/
> 48c3376927e5e9c13377bf3cfc8b0c411783e7f3

Funny I just now noticed bug 435420 [1] that was mentioned in that commit.

1. https://bugs.kde.org/show_bug.cgi?id=435420
Comment 7 Martin Sandsmark 2021-05-14 20:04:28 UTC
(In reply to Nate Graham from comment #3)
> That seems a little bit of a drastic step...

The alternative was to not have any Mangonel. Since it apparently was intentional I'd rather just replace kglobalaccel for now so it works for users not running Plasma as well.

(In reply to Nicolas Fella from comment #4)
> What desktop are you using?

Not really any, I run i3 as a window manager and a bunch of KDE stuff.


> If it's not Plasma then this is intentional
> since kglobalaccel interferes with other shortcut daemons

How does it interfere with other daemons? It has worked fine since KDE 1, with KDE applications running under a rather varied set of desktop environments.

If the issue is only that other desktop environments have conflicting shortcuts, that shouldn't be solved by breaking global shortcuts in all KDE applications for users not running a full Plasma session.

The whole point of the daemon is to avoid applications having conflicting global shortcuts, by handling them centrally.
Comment 8 Nate Graham 2021-05-14 20:14:25 UTC
If this change to kglobalaccel broke users, it needs to be revisited, not worked around in downstream software (ideally; I understand that when something abruptly breaks, it can be quite traumatic).
Comment 9 Nate Graham 2021-05-26 19:17:56 UTC
Git commit 9a48818abf50340e31d718cc675501dec6c51429 by Nate Graham.
Committed on 26/05/2021 at 19:14.
Pushed by ngraham into branch 'master'.

Revert "Prevent kglobalaccel5 getting activated on non-Plasma systems"

This reverts commit 48c3376927e5e9c13377bf3cfc8b0c411783e7f3.

This change broke users of KGlobalAccel run outside of the Plasma
Desktop. This sort of behavior change probably needs to be made during
a major transition like KF6 so that developers have some notice and it
doesn't randomly change and break stuff unexpectedly.
Related: bug 435420
FIXED-IN: 5.83

M  +0    -80   src/kglobalaccel.cpp

https://invent.kde.org/frameworks/kglobalaccel/commit/9a48818abf50340e31d718cc675501dec6c51429
Comment 10 Martin Sandsmark 2021-06-07 15:25:33 UTC
For whatever it is worth, sorry for my less than friendly tone in my comments here (and no, noone contacted me about it, I just went through my todo-bug-list and wasn't impressed by my wording here).
Comment 11 Nate Graham 2021-06-07 16:05:18 UTC
Thanks <3