Change Workspace::restack to operate on AbstractClient

icc-effect-5.14.5
Martin Gräßlin 2015-03-05 12:10:30 +01:00
parent fe7a6834b2
commit 792745c963
2 changed files with 6 additions and 5 deletions

View File

@ -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)); 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 // put in the stacking order below _all_ windows belonging to the active application
for (int i = 0; i < unconstrained_stacking_order.size(); ++i) { for (int i = 0; i < unconstrained_stacking_order.size(); ++i) {
Client *other = qobject_cast<Client*>(unconstrained_stacking_order.at(i)); AbstractClient *other = qobject_cast<AbstractClient*>(unconstrained_stacking_order.at(i));
if (other && other->layer() == c->layer() && Client::belongToSameApplication(under, other)) { if (other && other->layer() == c->layer() && AbstractClient::belongToSameApplication(under, other)) {
under = (c == other) ? 0 : other; under = (c == other) ? 0 : other;
break; break;
} }

View File

@ -50,6 +50,7 @@ namespace Xcb
class Window; class Window;
} }
class AbstractClient;
class Client; class Client;
class KillWindow; class KillWindow;
class ShortcutDialog; class ShortcutDialog;
@ -177,7 +178,7 @@ public:
void raiseClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp); void raiseClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp);
void lowerClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp); void lowerClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp);
void restackClientUnderActive(Client*); 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 updateClientLayer(Client* c);
void raiseOrLowerClient(Client*); void raiseOrLowerClient(Client*);
void resetUpdateToolWindowsTimer(); void resetUpdateToolWindowsTimer();