From aa34e8ec18884742a34ecbd24db278791f6d21af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 11 Dec 2012 22:49:16 +0100 Subject: [PATCH] Port (un)redirecting (sub)windows to XCB --- composite.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/composite.cpp b/composite.cpp index 24dba37877..bc51425a02 100644 --- a/composite.cpp +++ b/composite.cpp @@ -70,11 +70,6 @@ along with this program. If not, see . #include #include -#include - -#include -#include - #include #include @@ -247,7 +242,7 @@ void Compositor::slotCompositingOptionsInitialized() vBlankInterval = 1 << 10; // no sync - DO NOT set "0", would cause div-by-zero segfaults. m_timeSinceLastVBlank = fpsInterval - 1; // means "start now" - we don't have even a slight idea when the first vsync will occur scheduleRepaint(); - XCompositeRedirectSubwindows(display(), rootWindow(), CompositeRedirectManual); + xcb_composite_redirect_subwindows(connection(), rootWindow(), XCB_COMPOSITE_REDIRECT_MANUAL); new EffectsHandlerImpl(this, m_scene); // sets also the 'effects' pointer connect(effects, SIGNAL(screenGeometryChanged(QSize)), SLOT(addRepaintFull())); addRepaintFull(); @@ -298,7 +293,7 @@ void Compositor::finish() c->finishCompositing(); foreach (Deleted * c, Workspace::self()->deletedList()) c->finishCompositing(); - XCompositeUnredirectSubwindows(display(), rootWindow(), CompositeRedirectManual); + xcb_composite_unredirect_subwindows(connection(), rootWindow(), XCB_COMPOSITE_REDIRECT_MANUAL); delete effects; effects = NULL; delete m_scene; @@ -1126,12 +1121,12 @@ bool Toplevel::updateUnredirectedState() if (should && !unredirect) { unredirect = true; kDebug(1212) << "Unredirecting:" << this; - XCompositeUnredirectWindow(display(), frameId(), CompositeRedirectManual); + xcb_composite_unredirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL); return true; } else if (!should && unredirect) { unredirect = false; kDebug(1212) << "Redirecting:" << this; - XCompositeRedirectWindow(display(), frameId(), CompositeRedirectManual); + xcb_composite_redirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL); discardWindowPixmap(); return true; }