Call Platform::setupActionForGlobalAccel on the Client shortcut

Summary:
Platform::setupActionForGlobalAccel is an important call on X11 platform.
Without the x11 timestamp doesn't get updated and calls in KWin might
fail - e.g. the activation of the Client which is supposed to happen.

Test Plan: compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6802
This commit is contained in:
Martin Flöser 2017-07-20 19:14:07 +02:00
parent cf62ac8039
commit 4c996a57d4

View file

@ -37,6 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "input.h" #include "input.h"
#include "workspace.h" #include "workspace.h"
#include "effects.h" #include "effects.h"
#include "platform.h"
#include "screens.h" #include "screens.h"
#include "virtualdesktops.h" #include "virtualdesktops.h"
#include "scripting/scripting.h" #include "scripting/scripting.h"
@ -1050,6 +1051,7 @@ void Workspace::clientShortcutUpdated(Client* c)
if (!c->shortcut().isEmpty()) { if (!c->shortcut().isEmpty()) {
if (action == NULL) { // new shortcut if (action == NULL) { // new shortcut
action = new QAction(this); action = new QAction(this);
kwinApp()->platform()->setupActionForGlobalAccel(action);
action->setProperty("componentName", QStringLiteral(KWIN_NAME)); action->setProperty("componentName", QStringLiteral(KWIN_NAME));
action->setObjectName(key); action->setObjectName(key);
action->setText(i18n("Activate Window (%1)", c->caption())); action->setText(i18n("Activate Window (%1)", c->caption()));