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));
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<Client*>(unconstrained_stacking_order.at(i));
if (other && other->layer() == c->layer() && Client::belongToSameApplication(under, other)) {
AbstractClient *other = qobject_cast<AbstractClient*>(unconstrained_stacking_order.at(i));
if (other && other->layer() == c->layer() && AbstractClient::belongToSameApplication(under, other)) {
under = (c == other) ? 0 : other;
break;
}

View File

@ -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();