From 1e41e3e674612fe51d1671085a669aa4f7548e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 23 Jan 2015 09:54:03 +0100 Subject: [PATCH 1/2] Properly disconnect the test xcb connection So far it only got disconnected in the multi-head situation. REVIEW: 122218 --- main_x11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_x11.cpp b/main_x11.cpp index 738486eb65..e9b37904f0 100644 --- a/main_x11.cpp +++ b/main_x11.cpp @@ -198,6 +198,8 @@ KWIN_EXPORT int kdemain(int argc, char * argv[]) } const int number_of_screens = xcb_setup_roots_length(xcb_get_setup(c)); + xcb_disconnect(c); + c = nullptr; // multi head auto isMultiHead = []() -> bool { @@ -212,8 +214,6 @@ KWIN_EXPORT int kdemain(int argc, char * argv[]) KWin::Application::setX11ScreenNumber(primaryScreen); int pos; // Temporarily needed to reconstruct DISPLAY var if multi-head QByteArray display_name = qgetenv("DISPLAY"); - xcb_disconnect(c); - c = nullptr; if ((pos = display_name.lastIndexOf('.')) != -1) display_name.remove(pos, 10); // 10 is enough to be sure we removed ".s" From 7508cd49e032f3784255dcf2177b40f31cc042ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 27 Jan 2015 11:01:22 +0100 Subject: [PATCH 2/2] Trigger rebuilding of quads after creating a new DecorationShadow If there were already a shadow, the quads are rebuild, but not if we created a new shadow. This is not a problem if the shadow exists before the quads are built for the first time (e.g. when managing the window), but if the shadow is created later on the quads are incorrect and the shadow doesn't get rendered at all. This happens for example with Aurorae based decoration themes, where the creation of the first shadow is delayed into the next event cycle. --- shadow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shadow.cpp b/shadow.cpp index 4936a26c87..9581290b10 100644 --- a/shadow.cpp +++ b/shadow.cpp @@ -56,6 +56,11 @@ Shadow *Shadow::createShadow(Toplevel *toplevel) if (toplevel->effectWindow() && toplevel->effectWindow()->sceneWindow()) { toplevel->effectWindow()->sceneWindow()->updateShadow(shadow); } + if (shadow->hasDecorationShadow()) { + if (toplevel->effectWindow()) { + toplevel->effectWindow()->buildQuads(true); + } + } } return shadow; }