From 792745c9633be725143e16571910a9f6394b8985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 5 Mar 2015 12:10:30 +0100 Subject: [PATCH] Change Workspace::restack to operate on AbstractClient --- layers.cpp | 8 ++++---- workspace.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/layers.cpp b/layers.cpp index b6d5b75f8..fd33afe2e 100644 --- a/layers.cpp +++ b/layers.cpp @@ -431,14 +431,14 @@ void Workspace::lowerClientRequest(KWin::Client *c, NET::RequestSource src, xcb_ } -void Workspace::restack(Client* c, Client* under, bool force) +void Workspace::restack(AbstractClient* c, AbstractClient* under, bool force) { assert(unconstrained_stacking_order.contains(under)); - if (!force && !Client::belongToSameApplication(under, c)) { + if (!force && !AbstractClient::belongToSameApplication(under, c)) { // put in the stacking order below _all_ windows belonging to the active application for (int i = 0; i < unconstrained_stacking_order.size(); ++i) { - Client *other = qobject_cast(unconstrained_stacking_order.at(i)); - if (other && other->layer() == c->layer() && Client::belongToSameApplication(under, other)) { + AbstractClient *other = qobject_cast(unconstrained_stacking_order.at(i)); + if (other && other->layer() == c->layer() && AbstractClient::belongToSameApplication(under, other)) { under = (c == other) ? 0 : other; break; } diff --git a/workspace.h b/workspace.h index 4acefb4fc..a44d88d00 100644 --- a/workspace.h +++ b/workspace.h @@ -50,6 +50,7 @@ namespace Xcb class Window; } +class AbstractClient; class Client; class KillWindow; class ShortcutDialog; @@ -177,7 +178,7 @@ public: void raiseClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp); void lowerClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp); void restackClientUnderActive(Client*); - void restack(Client *c, Client *under, bool force = false); + void restack(AbstractClient *c, AbstractClient *under, bool force = false); void updateClientLayer(Client* c); void raiseOrLowerClient(Client*); void resetUpdateToolWindowsTimer();