Make Workspace::active_client an AbstractClient

icc-effect-5.14.5
Martin Gräßlin 2015-03-12 12:08:54 +01:00
parent 69f198e923
commit fdcaf2b86f
4 changed files with 9 additions and 9 deletions

View File

@ -227,7 +227,7 @@ namespace KWin
activeClient(). And of course, to propagate the active client to the
world.
*/
void Workspace::setActiveClient(Client* c)
void Workspace::setActiveClient(AbstractClient* c)
{
if (active_client == c)
return;

View File

@ -1689,7 +1689,7 @@ void Workspace::switchWindow(Direction direction)
{
if (!active_client)
return;
Client *c = active_client;
AbstractClient *c = active_client;
Client *switchTo = 0;
int bestScore = 0;
int d = c->desktop();

View File

@ -644,7 +644,7 @@ void Workspace::updateToolWindows(bool also_hide)
return;
}
const Group* group = NULL;
const Client* client = active_client;
const Client* client = dynamic_cast<Client*>(active_client);
// Go up in transiency hiearchy, if the top is found, only tool transients for the top mainwindow
// will be shown; if a group transient is group, all tools in the group will be shown
while (client != NULL) {
@ -903,7 +903,7 @@ void Workspace::updateClientVisibilityOnDesktopChange(uint oldDesktop, uint newD
void Workspace::activateClientOnNewDesktop(uint desktop)
{
Client* c = NULL;
AbstractClient* c = NULL;
if (options->focusPolicyIsReasonable()) {
c = findClientToActivateOnDesktop(desktop);
}
@ -927,7 +927,7 @@ void Workspace::activateClientOnNewDesktop(uint desktop)
focusToNull();
}
Client *Workspace::findClientToActivateOnDesktop(uint desktop)
AbstractClient *Workspace::findClientToActivateOnDesktop(uint desktop)
{
if (movingClient != NULL && active_client == movingClient &&
FocusChain::self()->contains(active_client, desktop) &&
@ -1019,7 +1019,7 @@ void Workspace::updateCurrentActivity(const QString &new_activity)
// Restore the focus on this desktop
--block_focus;
Client* c = 0;
AbstractClient* c = 0;
//FIXME below here is a lot of focuschain stuff, probably all wrong now
if (options->focusPolicyIsReasonable()) {

View File

@ -284,7 +284,7 @@ public:
void sendPingToWindow(xcb_window_t w, xcb_timestamp_t timestamp); // Called from Client::pingWindow()
void removeClient(Client*); // Only called from Client::destroyClient() or Client::releaseWindow()
void setActiveClient(Client*);
void setActiveClient(AbstractClient*);
Group* findGroup(xcb_window_t leader) const;
void addGroup(Group* group);
void removeGroup(Group* group);
@ -500,7 +500,7 @@ private:
void resetClientAreas(uint desktopCount);
void updateClientVisibilityOnDesktopChange(uint oldDesktop, uint newDesktop);
void activateClientOnNewDesktop(uint desktop);
Client *findClientToActivateOnDesktop(uint desktop);
AbstractClient *findClientToActivateOnDesktop(uint desktop);
QWidget* active_popup;
AbstractClient* active_popup_client;
@ -513,7 +513,7 @@ private:
static NET::WindowType txtToWindowType(const char* txt);
static bool sessionInfoWindowTypeMatch(Client* c, SessionInfo* info);
Client* active_client;
AbstractClient* active_client;
AbstractClient* last_active_client;
AbstractClient* most_recently_raised; // Used ONLY by raiseOrLowerClient()
AbstractClient* movingClient;