From 6bdf120b3f901233b8d690e1899aaae02da06193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 9 Jun 2015 23:28:48 +0200 Subject: [PATCH] Workspace::setShowingDesktop operates on AbstractClient --- workspace.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 30eb5485e7..83deeb7389 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1236,12 +1236,12 @@ void Workspace::setShowingDesktop(bool showing) rootInfo()->setShowingDesktop(showing); showing_desktop = showing; - Client *topDesk = nullptr; + AbstractClient *topDesk = nullptr; { // for the blocker RAII StackingUpdatesBlocker blocker(this); // updateLayer & lowerClient would invalidate stacking_order for (int i = stacking_order.count() - 1; i > -1; --i) { - Client *c = qobject_cast(stacking_order.at(i)); + AbstractClient *c = qobject_cast(stacking_order.at(i)); if (c && c->isOnCurrentDesktop()) { if (c->isDock()) { c->updateLayer(); @@ -1250,8 +1250,10 @@ void Workspace::setShowingDesktop(bool showing) lowerClient(c); if (!topDesk) topDesk = c; - foreach (Client *cm, c->group()->members()) { - cm->updateLayer(); + if (Client *client = qobject_cast(c)) { + foreach (Client *cm, client->group()->members()) { + cm->updateLayer(); + } } } }