diff --git a/src/effects.cpp b/src/effects.cpp index 26cdd60984..8db9b2052d 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -1717,6 +1717,11 @@ void EffectsHandlerImpl::renderScreen(EffectScreen *screen) scene()->paintScreen(output, Compositor::self()->windowsToRender()); } +bool EffectsHandlerImpl::isCursorHidden() const +{ + return Cursors::self()->isCursorHidden(); +} + //**************************************** // EffectScreenImpl //**************************************** diff --git a/src/effects.h b/src/effects.h index 151232da27..9dfa35f4d2 100644 --- a/src/effects.h +++ b/src/effects.h @@ -264,6 +264,7 @@ public: EffectScreen *findScreen(const QString &name) const override; EffectScreen *findScreen(int screenId) const override; void renderScreen(EffectScreen *screen) override; + bool isCursorHidden() const override; public Q_SLOTS: void slotCurrentTabAboutToChange(EffectWindow* from, EffectWindow* to); diff --git a/src/effects/startupfeedback/startupfeedback.cpp b/src/effects/startupfeedback/startupfeedback.cpp index 6f8fb6e31f..d0ef5af023 100644 --- a/src/effects/startupfeedback/startupfeedback.cpp +++ b/src/effects/startupfeedback/startupfeedback.cpp @@ -175,6 +175,9 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, std::chrono } m_lastPresentTime = presentTime; + if (m_active && effects->isCursorHidden()) { + stop(); + } if (m_active) { // need the unclipped version switch(m_type) { @@ -289,7 +292,7 @@ void StartupFeedbackEffect::gotStartupChange(const QString &id, const QIcon &ico void StartupFeedbackEffect::start(const QIcon &icon) { - if (m_type == NoFeedback || m_splashVisible) + if (m_type == NoFeedback || m_splashVisible || effects->isCursorHidden()) return; if (!m_active) effects->startMousePolling(); diff --git a/src/libkwineffects/kwineffects.h b/src/libkwineffects/kwineffects.h index 3057baa6e8..3e34fa8b02 100644 --- a/src/libkwineffects/kwineffects.h +++ b/src/libkwineffects/kwineffects.h @@ -1262,6 +1262,11 @@ public: */ virtual void showCursor() = 0; + /** + * @returns Whether or not the cursor is currently hidden + */ + virtual bool isCursorHidden() const = 0; + /** * Starts an interactive window selection process. *