diff --git a/effects/invert/invert.cpp b/effects/invert/invert.cpp index c412e31644..291aa6b017 100644 --- a/effects/invert/invert.cpp +++ b/effects/invert/invert.cpp @@ -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" diff --git a/effects/invert/invert.h b/effects/invert/invert.h index 908eef4aff..ef6cd91424 100644 --- a/effects/invert/invert.h +++ b/effects/invert/invert.h @@ -54,6 +54,9 @@ public slots: void toggleWindow(); void slotWindowClosed(KWin::EffectWindow *w); +private Q_SLOTS: + void resetShader(); + protected: bool loadData();