diff --git a/client.h b/client.h index c34079baa9..dbedc99ef9 100644 --- a/client.h +++ b/client.h @@ -481,7 +481,7 @@ public: void hideClient(bool hide); bool hiddenPreview() const; ///< Window is mapped in order to get a window pixmap - virtual void setupCompositing(); + virtual bool setupCompositing(); virtual void finishCompositing(); void setBlockingCompositing(bool block); inline bool isBlockingCompositing() { return blocks_compositing; } diff --git a/composite.cpp b/composite.cpp index 6a27e000be..2ee9e7703c 100644 --- a/composite.cpp +++ b/composite.cpp @@ -520,19 +520,20 @@ void Workspace::delayedCheckUnredirect() // Toplevel //**************************************** -void Toplevel::setupCompositing() +bool Toplevel::setupCompositing() { if (!compositing()) - return; + return false; damageRatio = 0.0; if (damage_handle != None) - return; + return false; damage_handle = XDamageCreate(display(), frameId(), XDamageReportRawRectangles); damage_region = QRegion(0, 0, width(), height()); effect_window = new EffectWindowImpl(this); unredirect = false; workspace()->checkUnredirect(true); scene->windowAdded(this); + return true; } void Toplevel::finishCompositing() @@ -836,12 +837,15 @@ void Toplevel::suspendUnredirect(bool suspend) // Client //**************************************** -void Client::setupCompositing() +bool Client::setupCompositing() { - Toplevel::setupCompositing(); + if (!Toplevel::setupCompositing()){ + return false; + } updateVisibility(); // for internalKeep() updateDecoration(true, true); move(calculateGravitation(true)); // we just polluted the gravity because the window likely has no decoration yet + return true; } void Client::finishCompositing() diff --git a/toplevel.h b/toplevel.h index 95044f3e63..fabb129e74 100644 --- a/toplevel.h +++ b/toplevel.h @@ -227,7 +227,7 @@ public: double opacity() const; int depth() const; bool hasAlpha() const; - virtual void setupCompositing(); + virtual bool setupCompositing(); virtual void finishCompositing(); bool updateUnredirectedState(); bool unredirected() const;