From faf27f481e52daa33daea2f8d1350ba03813d938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 12 Sep 2012 23:00:15 +0200 Subject: [PATCH] kwin: Don't hold an X server grab while painting the screen According to Pierre-Loup Griffais (Plagman on IRC) this is causing choppy VDPAU video playback when compositing is enabled. Removing these calls doesn't seem to cause any regressions, and the commit that added them doesn't give a reason. So let's just get rid of them for now. This commit should be cherry-picked to the stable branch if no one else notices any regressions. CCMAIL: kwin@kde.org --- scene_opengl_egl.cpp | 3 +-- scene_opengl_glx.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scene_opengl_egl.cpp b/scene_opengl_egl.cpp index 33e8960413..06d196a480 100644 --- a/scene_opengl_egl.cpp +++ b/scene_opengl_egl.cpp @@ -200,14 +200,13 @@ int SceneOpenGL::paint(QRegion damage, ToplevelList toplevels) stacking_order.append(windows[ c ]); } - grabXServer(); XSync(display(), false); int mask = 0; paintScreen(&mask, &damage); // call generic implementation m_lastMask = mask; m_lastDamage = damage; glFlush(); - ungrabXServer(); + if (m_overlayWindow->window()) // show the window only after the first pass, since m_overlayWindow->show(); // that pass may take long diff --git a/scene_opengl_glx.cpp b/scene_opengl_glx.cpp index e0654b5861..e52d92881a 100644 --- a/scene_opengl_glx.cpp +++ b/scene_opengl_glx.cpp @@ -468,7 +468,6 @@ int SceneOpenGL::paint(QRegion damage, ToplevelList toplevels) stacking_order.append(windows[ c ]); } - grabXServer(); glXWaitX(); if (m_resetModelViewProjectionMatrix) { // reset model view projection matrix if required @@ -487,7 +486,6 @@ int SceneOpenGL::paint(QRegion damage, ToplevelList toplevels) glFlush(); - ungrabXServer(); if (m_overlayWindow->window()) // show the window only after the first pass, m_overlayWindow->show(); // since that pass may take long