From 58ed2e9a75bca60302a051b30a5d7011a52bc08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 3 Oct 2012 18:57:00 +0200 Subject: [PATCH 1/4] Hardcode TabBox setting in boxswitch effect false Boxswitch is activated as tabbox, possibly due to a downstream issue This results in multiple effects being assigned to the tabbox and no GUI way for the user to fix this. Since the BoxSwitch effects nowadays only exists as sidearm for coverswitch, the tabbox setting is now hardcoded and disabled in the effect, making it completely impossible to accidentally use it as tabbox. BUG: 303387 REVIEW: 106695 FIXED-IN: 4.9.3 --- effects/boxswitch/boxswitch.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/effects/boxswitch/boxswitch.cpp b/effects/boxswitch/boxswitch.cpp index a24173613d..b642d3f8e1 100644 --- a/effects/boxswitch/boxswitch.cpp +++ b/effects/boxswitch/boxswitch.cpp @@ -42,7 +42,7 @@ BoxSwitchEffect::BoxSwitchEffect() , painting_desktop(0) , animation(false) , highlight_is_set(false) - , primaryTabBox(true) + , primaryTabBox(false) , secondaryTabBox(false) , mProxy(this) , mProxyActivated(0) @@ -86,8 +86,9 @@ void BoxSwitchEffect::reconfigure(ReconfigureFlags) elevate_window = conf.readEntry("ElevateSelected", true); mAnimateSwitch = conf.readEntry("AnimateSwitch", false); - primaryTabBox = conf.readEntry("TabBox", false); - secondaryTabBox = conf.readEntry("TabBoxAlternative", false); + // the tabbox merely exists as CoverSwitch sidearm, force it to be not the tabbox + primaryTabBox = false; + secondaryTabBox = false; } void BoxSwitchEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) From e262d4fde62759a5d46fd47e8259c18bb9133a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Sun, 7 Oct 2012 14:14:15 +0200 Subject: [PATCH 2/4] kwin: Enable loose binding with the Intel driver --- libkwineffects/kwinglplatform.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp index 26341e4d8b..c08eda5fdc 100644 --- a/libkwineffects/kwinglplatform.cpp +++ b/libkwineffects/kwinglplatform.cpp @@ -726,6 +726,7 @@ void GLPlatform::detect() m_supportsGLSL = false; m_limitedGLSL = m_supportsGLSL && m_chipClass < I965; + m_looseBinding = true; } #ifdef KWIN_HAVE_OPENGLES From e4d970ef5fce50c83407986f7ec3c1cb217b6f60 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 3/4] 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. (cherry picked from commit 20e6349843d9bb838673a301330d7dc5d08401a5) --- 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 b016bba932..1fe2f180ba 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 From 70c35b8284c7db9ffb52fdbbba55d988f70f4e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 30 Oct 2012 18:20:00 +0100 Subject: [PATCH 4/4] kwin/glx: Avoid MSAA configs in initBufferConfigs() It appears that we're accidentally choosing an MSAA config with the Intel driver in Mesa 9.0. So change the algorithm to take the values of GLX_SAMPLES and GLX_SAMPLE_BUFFERS into account. Found by Kenneth Graunke. --- scene_opengl_glx.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scene_opengl_glx.cpp b/scene_opengl_glx.cpp index 1fe2f180ba..cf7933baf5 100644 --- a/scene_opengl_glx.cpp +++ b/scene_opengl_glx.cpp @@ -270,12 +270,15 @@ bool SceneOpenGL::initBufferConfigs() fbcbuffer_nondb = NULL; for (int i = 0; i < 2; i++) { - int back, stencil, depth, caveat, alpha; + int back, stencil, depth, caveat, msaa_buffers, msaa_samples, alpha; back = i > 0 ? INT_MAX : 1; stencil = INT_MAX; depth = INT_MAX; caveat = INT_MAX; + msaa_buffers = INT_MAX; + msaa_samples = INT_MAX; alpha = 0; + for (int j = 0; j < cnt; j++) { XVisualInfo *vi; int visual_depth; @@ -322,10 +325,26 @@ bool SceneOpenGL::initBufferConfigs() GLX_CONFIG_CAVEAT, &caveat_value); if (caveat_value > caveat) continue; + + int msaa_buffers_value; + glXGetFBConfigAttrib(display(), fbconfigs[j], GLX_SAMPLE_BUFFERS, + &msaa_buffers_value); + if (msaa_buffers_value > msaa_buffers) + continue; + + int msaa_samples_value; + glXGetFBConfigAttrib(display(), fbconfigs[j], GLX_SAMPLES, + &msaa_samples_value); + if (msaa_samples_value > msaa_samples) + continue; + back = back_value; stencil = stencil_value; depth = depth_value; caveat = caveat_value; + msaa_buffers = msaa_buffers_value; + msaa_samples = msaa_samples_value; + if (i > 0) fbcbuffer_nondb = fbconfigs[ j ]; else