x11: trigger shortcuts when releasing rather than pressing
This way we can issue a keyboard grab without problems
This commit is contained in:
parent
1f443301ed
commit
9a31b0d727
1 changed files with 5 additions and 1 deletions
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include <KConfigGroup>
|
||||
#include <KCrash>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include <QOpenGLContext>
|
||||
|
@ -368,7 +369,10 @@ void X11StandalonePlatform::startInteractivePositionSelection(std::function<void
|
|||
|
||||
void X11StandalonePlatform::setupActionForGlobalAccel(QAction *action)
|
||||
{
|
||||
connect(action, &QAction::triggered, kwinApp(), [action] {
|
||||
connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutActiveChanged, kwinApp(), [action](QAction *triggeredAction, bool active) {
|
||||
if (triggeredAction != action)
|
||||
return;
|
||||
|
||||
QVariant timestamp = action->property("org.kde.kglobalaccel.activationTimestamp");
|
||||
bool ok = false;
|
||||
const quint32 t = timestamp.toULongLong(&ok);
|
||||
|
|
Loading…
Reference in a new issue