From 37279504cbf460ea86c633cf7dfd936e301051a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 3 Aug 2013 22:13:14 +0200 Subject: [PATCH] bind unredirection change to unredirection update when the option changes, the compositor needs to update the state as it will later not act (in the disabled case) and should to reflect the option change. REVIEW: 111867 BUG: 322633 FIXED-IN: 4.11 --- composite.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composite.cpp b/composite.cpp index f5de2fb66d..097d08500f 100644 --- a/composite.cpp +++ b/composite.cpp @@ -98,6 +98,7 @@ Compositor::Compositor(QObject* workspace) connect(&unredirectTimer, SIGNAL(timeout()), SLOT(delayedCheckUnredirect())); connect(&compositeResetTimer, SIGNAL(timeout()), SLOT(restart())); connect(workspace, SIGNAL(configChanged()), SLOT(slotConfigChanged())); + connect(options, SIGNAL(unredirectFullscreenChanged()), SLOT(delayedCheckUnredirect())); unredirectTimer.setSingleShot(true); compositeResetTimer.setSingleShot(true); nextPaintReference.invalidate(); // Initialize the timer @@ -705,7 +706,7 @@ void Compositor::checkUnredirect(bool force) void Compositor::delayedCheckUnredirect() { - if (!hasScene() || m_scene->overlayWindow()->window() == None || !options->isUnredirectFullscreen()) + if (!hasScene() || m_scene->overlayWindow()->window() == None || !(options->isUnredirectFullscreen() || sender() == options)) return; ToplevelList list; bool changed = forceUnredirectCheck; @@ -1072,7 +1073,8 @@ void Toplevel::addWorkspaceRepaint(const QRect& r2) bool Toplevel::updateUnredirectedState() { assert(compositing()); - bool should = shouldUnredirect() && !unredirectSuspend && !shape() && !hasAlpha() && opacity() == 1.0 && + bool should = options->isUnredirectFullscreen() && shouldUnredirect() && !unredirectSuspend && + !shape() && !hasAlpha() && opacity() == 1.0 && !static_cast(effects)->activeFullScreenEffect(); if (should == unredirect) return false;