aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2013-01-10 09:10:35 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2013-01-14 14:41:08 (GMT)
commit048fe5397dbdabb791c4082f3a56ef23942d3bac (patch)
tree76e409e4ba4767cbdc180f6181d27d783b449f86
parent327b346a39f9b9c0bcdea56a71f49ede98d1243e (diff)
Remove asserts from Compositor and wrap Toplevel::compositing() around Workspace::compositing()
BUG: 312712 FIXED-IN: 4.10 REVIEW: 108321
-rw-r--r--kwin/composite.cpp3
-rw-r--r--kwin/composite.h1
-rw-r--r--kwin/workspace.h10
3 files changed, 6 insertions, 8 deletions
diff --git a/kwin/composite.cpp b/kwin/composite.cpp
index 99eb65d..ea540a4 100644
--- a/kwin/composite.cpp
+++ b/kwin/composite.cpp
@@ -935,8 +935,7 @@ void Toplevel::damageNotifyEvent(XDamageNotifyEvent* e)
bool Toplevel::compositing() const
{
- Compositor *c = Compositor::self();
- return c && c->hasScene();
+ return Workspace::self()->compositing();
}
void Client::damageNotifyEvent(XDamageNotifyEvent* e)
diff --git a/kwin/composite.h b/kwin/composite.h
index 1655ffe..04ac4d5 100644
--- a/kwin/composite.h
+++ b/kwin/composite.h
@@ -139,7 +139,6 @@ public:
* @see createCompositor
**/
static Compositor *self() {
- Q_ASSERT(s_compositor);
return s_compositor;
}
/**
diff --git a/kwin/workspace.h b/kwin/workspace.h
index 708e233..ff37842 100644
--- a/kwin/workspace.h
+++ b/kwin/workspace.h
@@ -525,6 +525,11 @@ public:
return movingClient;
}
+ /**
+ * @returns Whether we have a Compositor and it is active (Scene created)
+ **/
+ bool compositing() const;
+
public slots:
// Keybindings
void slotSwitchDesktopNext();
@@ -745,11 +750,6 @@ private:
static NET::WindowType txtToWindowType(const char* txt);
static bool sessionInfoWindowTypeMatch(Client* c, SessionInfo* info);
- /**
- * @returns Whether we have a Compositor and it is active (Scene created)
- **/
- bool compositing() const;
-
Client* active_client;
Client* last_active_client;
Client* most_recently_raised; // Used ONLY by raiseOrLowerClient()