diff --git a/composite.cpp b/composite.cpp index e0c6d40af6..710ffa00d4 100644 --- a/composite.cpp +++ b/composite.cpp @@ -261,8 +261,11 @@ void Workspace::setupOverlay( Window w ) { assert( overlay != None ); XShapeCombineRectangles( display(), overlay, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted ); - XShapeCombineRectangles( display(), w, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted ); - XMapWindow( display(), w ); + if( w != None ) + { + XShapeCombineRectangles( display(), w, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted ); + XMapWindow( display(), w ); + } XMapRaised( display(), overlay ); } diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 17a8f7f554..3f604defae 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -77,9 +77,17 @@ SceneXrender::SceneXrender( Workspace* ws ) { // create XRender picture for the root window format = XRenderFindVisualFormat( display(), DefaultVisual( display(), DefaultScreen( display()))); - XRenderPictureAttributes pa; - pa.subwindow_mode = IncludeInferiors; - front = XRenderCreatePicture( display(), rootWindow(), format, CPSubwindowMode, &pa ); + if( wspace->createOverlay()) + { + wspace->setupOverlay( None ); + front = XRenderCreatePicture( display(), wspace->overlayWindow(), format, 0, NULL ); + } + else + { + XRenderPictureAttributes pa; + pa.subwindow_mode = IncludeInferiors; + front = XRenderCreatePicture( display(), rootWindow(), format, CPSubwindowMode, &pa ); + } createBuffer(); } @@ -87,6 +95,7 @@ SceneXrender::~SceneXrender() { XRenderFreePicture( display(), front ); XRenderFreePicture( display(), buffer ); + wspace->destroyOverlay(); for( QMap< Toplevel*, Window >::Iterator it = windows.begin(); it != windows.end(); ++it )