reset invert shader on viewport resize

General problem known from bug #325154

BUG: 325154
FXED-IN: 4.11.2
REVIEW: 112877
This commit is contained in:
Thomas Lübking 2013-09-22 00:36:47 +02:00
parent 66ffd9f0f6
commit 149e97fcb9
2 changed files with 9 additions and 0 deletions

View file

@ -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"

View file

@ -54,6 +54,9 @@ public slots:
void toggleWindow();
void slotWindowClosed(KWin::EffectWindow *w);
private Q_SLOTS:
void resetShader();
protected:
bool loadData();