From e5b1dd90bc52fc8f25c7a83149c5110e1e2c297c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 13 May 2008 21:15:15 +0000 Subject: [PATCH] Restore color settings after painting background. Fixes splashscreen being fully black during KDE startup, not that I understand why. svn path=/trunk/KDE/kdebase/workspace/; revision=807447 --- scene_opengl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 53d5f5cff0..7420cdabb0 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -728,10 +728,15 @@ void SceneOpenGL::paintBackground( QRegion region ) PaintClipper pc( region ); if( !PaintClipper::clip()) { + glPushAttrib( GL_COLOR_BUFFER_BIT ); glClearColor( 0, 0, 0, 1 ); // black glClear( GL_COLOR_BUFFER_BIT ); + glPopAttrib(); return; } + if( clip() && pc.paintArea().isEmpty()) + return; // no background to paint + glPushAttrib( GL_CURRENT_BIT ); glColor4f( 0, 0, 0, 1 ); // black for( PaintClipper::Iterator iterator; !iterator.isDone(); @@ -745,6 +750,7 @@ void SceneOpenGL::paintBackground( QRegion region ) glVertex2i( r.x(), r.y() + r.height()); glEnd(); } + glPopAttrib(); } void SceneOpenGL::windowAdded( Toplevel* c )