Commit 4fe08cd0 authored by Thomas Lübking's avatar Thomas Lübking
Browse files

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
parent e5bdfcf3
......@@ -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<EffectsHandlerImpl*>(effects)->activeFullScreenEffect();
if (should == unredirect)
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment