diff --git a/workspace.cpp b/workspace.cpp index df3a98785c..14606fd902 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -189,6 +189,12 @@ Workspace::Workspace(bool restore) // Select windowmanager privileges selectWmInputEventMask(); +#if QT_VERSION < 0x050302 + // WORKAROUND: QXcbScreen before 5.3.2 overrides them, see bug #335926, QTBUG-39648 + // TODO once we depend on Qt 5.4 remove it + connect(qApp, SIGNAL(screenAdded(QScreen*)), this, SLOT(selectWmInputEventMask())); +#endif + #ifdef KWIN_BUILD_SCREENEDGES ScreenEdges::create(this); #endif @@ -1111,7 +1117,6 @@ void Workspace::selectWmInputEventMask() { uint32_t presentMask = 0; Xcb::WindowAttributes attr(rootWindow()); - Xcb::WindowGeometry geo(rootWindow()); if (!attr.isNull()) { presentMask = attr->your_event_mask; } diff --git a/workspace.h b/workspace.h index e08bf55e6b..500e800342 100644 --- a/workspace.h +++ b/workspace.h @@ -409,6 +409,7 @@ public Q_SLOTS: private Q_SLOTS: void desktopResized(); + void selectWmInputEventMask(); void slotUpdateToolWindows(); void delayFocus(); void slotReloadConfig(); @@ -451,7 +452,6 @@ private: template void initShortcut(const QString &actionName, const QString &description, const QKeySequence &shortcut, Slot slot, const QVariant &data = QVariant()); - void selectWmInputEventMask(); void setupWindowShortcut(Client* c); enum Direction { DirectionNorth,