From 149e97fcb9e3cf98bda8b6561cc05b9240a149ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 22 Sep 2013 00:36:47 +0200 Subject: [PATCH] reset invert shader on viewport resize General problem known from bug #325154 BUG: 325154 FXED-IN: 4.11.2 REVIEW: 112877 --- effects/invert/invert.cpp | 6 ++++++ effects/invert/invert.h | 3 +++ 2 files changed, 9 insertions(+) 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();