diff --git a/COMPOSITE_TODO b/COMPOSITE_TODO index 072c5fd734..d25cdcb940 100644 --- a/COMPOSITE_TODO +++ b/COMPOSITE_TODO @@ -49,14 +49,6 @@ General TODO ! - scene_xrender.cpp also requires XFixes ! - check whether it compiles fine without XComposite/XDamage -? XComposite overlay window -? - does it make any sense to use it instead of painting directly to the root window - when the root window's visual etc. are good? - - it seems OpenGL drawing to the root window is always clipped, unlike with X drawing, - so the overlay should be always used, or manual double-buffering should be used - - nvidia has option "DisableGLXRootClipping" though, make kwin config option to draw - directly to the root window? - ! the opacity slider in the Alt+F3 menu doesn't work - looks like the hack with adding custom widgets to popups no longer works - it should probably be just changed to normal menu with reasonable opacity values diff --git a/scene_opengl.cpp b/scene_opengl.cpp index dbdabdd323..640245646a 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -88,18 +88,6 @@ static void checkGLError( const char* txt ) kWarning() << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) << endl; } -// attributes for finding a double-buffered root window config -const int root_db_attrs[] = - { - GLX_CONFIG_CAVEAT, GLX_NONE, - GLX_DOUBLEBUFFER, True, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_RENDER_TYPE, GLX_RGBA_BIT, - None - }; - // attributes for finding a double-buffered destination window config static const int buffer_db_attrs[] = { @@ -238,18 +226,9 @@ void SceneOpenGL::initBuffer() { XWindowAttributes attrs; XGetWindowAttributes( display(), rootWindow(), &attrs ); - if( false && findConfig( root_db_attrs, &fbcbuffer, XVisualIDFromVisual( attrs.visual ))) - { - // root window is double-buffered, paint directly to it - // TODO no need to use overlay? - db = true; - buffer = rootWindow(); - glxbuffer = glXCreateWindow( display(), fbcbuffer, buffer, NULL ); - } - else if( false && findConfig( buffer_db_attrs, &fbcbuffer ) && wspace->createOverlay()) + if( findConfig( buffer_db_attrs, &fbcbuffer ) && wspace->createOverlay()) { // we have overlay, try to create double-buffered window in it XVisualInfo* visual = glXGetVisualFromFBConfig( display(), fbcbuffer ); - kDebug() << "Using overlay visual 0x" << QString::number( visual->visualid ) << endl; XSetWindowAttributes attrs; attrs.colormap = XCreateColormap( display(), rootWindow(), visual->visual, AllocNone ); buffer = XCreateWindow( display(), wspace->overlayWindow(), 0, 0, displayWidth(), displayHeight(),