From 6c0ed26c657cfb6101c60e4dfd764239ddea6f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 4 Mar 2016 14:14:44 +0100 Subject: [PATCH] Add bool checkInputWindowEvent(QWheelEvent *e) to EffectsHandlerImpl Allows to also pass through some QWheelEvents. --- effects.cpp | 11 +++++++++++ effects.h | 1 + 2 files changed, 12 insertions(+) diff --git a/effects.cpp b/effects.cpp index 1bf619a32a..7b968d7216 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1285,6 +1285,17 @@ bool EffectsHandlerImpl::checkInputWindowEvent(QMouseEvent *e) return true; } +bool EffectsHandlerImpl::checkInputWindowEvent(QWheelEvent *e) +{ + if (m_grabbedMouseEffects.isEmpty()) { + return false; + } + foreach (Effect *effect, m_grabbedMouseEffects) { + effect->windowInputMouseEvent(e); + } + return true; +} + void EffectsHandlerImpl::connectNotify(const QMetaMethod &signal) { if (signal == QMetaMethod::fromSignal(&EffectsHandler::cursorShapeChanged)) { diff --git a/effects.h b/effects.h index 7145448052..f7bd4ba1a0 100644 --- a/effects.h +++ b/effects.h @@ -167,6 +167,7 @@ public: bool checkInputWindowEvent(xcb_button_press_event_t *e); bool checkInputWindowEvent(xcb_motion_notify_event_t *e); bool checkInputWindowEvent(QMouseEvent *e); + bool checkInputWindowEvent(QWheelEvent *e); void checkInputWindowStacking(); void reserveElectricBorder(ElectricBorder border, Effect *effect) override;