diff --git a/src/toplevel.cpp b/src/toplevel.cpp index 9281cbfc1f..7479c0f096 100644 --- a/src/toplevel.cpp +++ b/src/toplevel.cpp @@ -285,10 +285,7 @@ void Toplevel::finishCompositing(ReleaseReason) bool Toplevel::compositing() const { - if (!Workspace::self()) { - return false; - } - return Workspace::self()->compositing(); + return Compositor::compositing(); } void Toplevel::addRepaint(const QRect &rect) diff --git a/src/workspace.cpp b/src/workspace.cpp index 4fbff10a30..13d89df7ec 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -1891,7 +1891,7 @@ Toplevel *Workspace::findInternal(QWindow *w) const bool Workspace::compositing() const { - return m_compositor && m_compositor->scene(); + return Compositor::compositing(); } void Workspace::markXStackingOrderAsDirty()