From 69d45962cb23992379a224489b14d94149e6d4d0 Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Wed, 18 Jun 2008 16:41:26 +0000 Subject: [PATCH] Reset 'buffer' to None after freeing it. That fixes the bug that XRender compositing can't be initialized correctly on KDE startup. svn path=/trunk/KDE/kdebase/workspace/; revision=821854 --- scene_xrender.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene_xrender.cpp b/scene_xrender.cpp index ede5d47ad4..434bc5eafa 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -139,6 +139,7 @@ SceneXrender::~SceneXrender() } XRenderFreePicture( display(), front ); XRenderFreePicture( display(), buffer ); + buffer = None; wspace->destroyOverlay(); foreach( Window* w, windows ) delete w; @@ -153,8 +154,6 @@ bool SceneXrender::initFailed() const // so it is done manually using this buffer, void SceneXrender::createBuffer() { - if( buffer != None ) - XRenderFreePicture( display(), buffer ); Pixmap pixmap = XCreatePixmap( display(), rootWindow(), displayWidth(), displayHeight(), DefaultDepth( display(), DefaultScreen( display()))); buffer = XRenderCreatePicture( display(), pixmap, format, 0, 0 ); XFreePixmap( display(), pixmap ); // The picture owns the pixmap now