Workspace::findDesktop returns AbstractClient

icc-effect-5.14.5
Martin Gräßlin 2015-09-14 13:31:41 +02:00
parent a421f546cd
commit a9d8926d3c
3 changed files with 5 additions and 5 deletions

View File

@ -262,19 +262,19 @@ Client* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstraine
return 0;
}
Client* Workspace::findDesktop(bool topmost, int desktop) const
AbstractClient* Workspace::findDesktop(bool topmost, int desktop) const
{
// TODO Q_ASSERT( block_stacking_updates == 0 );
if (topmost) {
for (int i = stacking_order.size() - 1; i >= 0; i--) {
Client *c = qobject_cast<Client*>(stacking_order.at(i));
AbstractClient *c = qobject_cast<AbstractClient*>(stacking_order.at(i));
if (c && c->isOnDesktop(desktop) && c->isDesktop()
&& c->isShown(true))
return c;
}
} else { // bottom-most
foreach (Toplevel * c, stacking_order) {
Client *client = qobject_cast<Client*>(c);
AbstractClient *client = qobject_cast<AbstractClient*>(c);
if (client && c->isOnDesktop(desktop) && c->isDesktop()
&& client->isShown(true))
return client;

View File

@ -352,7 +352,7 @@ void Workspace::init()
} // End updates blocker block
Client* new_active_client = NULL;
AbstractClient* new_active_client = nullptr;
if (!qApp->isSessionRestored()) {
--block_focus;
new_active_client = findClient(Predicate::WindowMatch, client_info.activeWindow());

View File

@ -247,7 +247,7 @@ public:
Client* topClientOnDesktop(int desktop, int screen, bool unconstrained = false,
bool only_normal = true) const;
Client* findDesktop(bool topmost, int desktop) const;
AbstractClient* findDesktop(bool topmost, int desktop) const;
void sendClientToDesktop(AbstractClient* c, int desktop, bool dont_activate);
void windowToPreviousDesktop(AbstractClient* c);
void windowToNextDesktop(AbstractClient* c);