effecst: disable launch feedback effect if cursor is hidden
Gets annoying with touch
This commit is contained in:
parent
2c6821fdca
commit
5b86afa6f0
4 changed files with 15 additions and 1 deletions
|
@ -1717,6 +1717,11 @@ void EffectsHandlerImpl::renderScreen(EffectScreen *screen)
|
||||||
scene()->paintScreen(output, Compositor::self()->windowsToRender());
|
scene()->paintScreen(output, Compositor::self()->windowsToRender());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EffectsHandlerImpl::isCursorHidden() const
|
||||||
|
{
|
||||||
|
return Cursors::self()->isCursorHidden();
|
||||||
|
}
|
||||||
|
|
||||||
//****************************************
|
//****************************************
|
||||||
// EffectScreenImpl
|
// EffectScreenImpl
|
||||||
//****************************************
|
//****************************************
|
||||||
|
|
|
@ -264,6 +264,7 @@ public:
|
||||||
EffectScreen *findScreen(const QString &name) const override;
|
EffectScreen *findScreen(const QString &name) const override;
|
||||||
EffectScreen *findScreen(int screenId) const override;
|
EffectScreen *findScreen(int screenId) const override;
|
||||||
void renderScreen(EffectScreen *screen) override;
|
void renderScreen(EffectScreen *screen) override;
|
||||||
|
bool isCursorHidden() const override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void slotCurrentTabAboutToChange(EffectWindow* from, EffectWindow* to);
|
void slotCurrentTabAboutToChange(EffectWindow* from, EffectWindow* to);
|
||||||
|
|
|
@ -175,6 +175,9 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, std::chrono
|
||||||
}
|
}
|
||||||
m_lastPresentTime = presentTime;
|
m_lastPresentTime = presentTime;
|
||||||
|
|
||||||
|
if (m_active && effects->isCursorHidden()) {
|
||||||
|
stop();
|
||||||
|
}
|
||||||
if (m_active) {
|
if (m_active) {
|
||||||
// need the unclipped version
|
// need the unclipped version
|
||||||
switch(m_type) {
|
switch(m_type) {
|
||||||
|
@ -289,7 +292,7 @@ void StartupFeedbackEffect::gotStartupChange(const QString &id, const QIcon &ico
|
||||||
|
|
||||||
void StartupFeedbackEffect::start(const QIcon &icon)
|
void StartupFeedbackEffect::start(const QIcon &icon)
|
||||||
{
|
{
|
||||||
if (m_type == NoFeedback || m_splashVisible)
|
if (m_type == NoFeedback || m_splashVisible || effects->isCursorHidden())
|
||||||
return;
|
return;
|
||||||
if (!m_active)
|
if (!m_active)
|
||||||
effects->startMousePolling();
|
effects->startMousePolling();
|
||||||
|
|
|
@ -1262,6 +1262,11 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void showCursor() = 0;
|
virtual void showCursor() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns Whether or not the cursor is currently hidden
|
||||||
|
*/
|
||||||
|
virtual bool isCursorHidden() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts an interactive window selection process.
|
* Starts an interactive window selection process.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue