Only push shader when Cube effect is active

This caused situations in which the shader was pushed but never
popped from the stack as for the latter case there was a check
whether the effect is active.

BUG: 280455
This commit is contained in:
Martin Gräßlin 2011-09-27 17:42:20 +02:00
parent ed216df8e3
commit 38d760c960

View file

@ -1292,9 +1292,10 @@ void CubeEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int t
void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
{ {
ShaderManager *shaderManager = ShaderManager::instance(); ShaderManager *shaderManager = ShaderManager::instance();
GLShader *shader = shaderManager->pushShader(ShaderManager::GenericShader); GLShader *shader = NULL;
QMatrix4x4 origMatrix; QMatrix4x4 origMatrix;
if (activated && cube_painting) { if (activated && cube_painting) {
shader = shaderManager->pushShader(ShaderManager::GenericShader);
//kDebug(1212) << w->caption(); //kDebug(1212) << w->caption();
float opacity = cubeOpacity; float opacity = cubeOpacity;
if (start) { if (start) {