Commit 0e3c88b8 authored by Thomas Lübking's avatar Thomas Lübking
Browse files

reset invert shader on viewport resize

General problem known from bug #325154

BUG: 325154
FXED-IN: 4.11.2
REVIEW: 112877
parent c2e7e0e5
......@@ -56,6 +56,7 @@ InvertEffect::InvertEffect()
b->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_U));
connect(b, SIGNAL(triggered(bool)), this, SLOT(toggleWindow()));
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
connect(effects, SIGNAL(screenGeometryChanged(const QSize&)), this, SLOT(resetShader()));
}
InvertEffect::~InvertEffect()
......@@ -175,6 +176,11 @@ bool InvertEffect::provides(Feature f)
return f == ScreenInversion;
}
void InvertEffect::resetShader()
{
ShaderManager::instance()->resetShader(m_shader, ShaderManager::GenericShader);
}
} // namespace
#include "invert.moc"
......@@ -54,6 +54,9 @@ public slots:
void toggleWindow();
void slotWindowClosed(KWin::EffectWindow *w);
private Q_SLOTS:
void resetShader();
protected:
bool loadData();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment