diff --git a/client.h b/client.h index 84584a22f2..26d1700cb7 100644 --- a/client.h +++ b/client.h @@ -273,6 +273,7 @@ class Client : public QObject, public KDecorationDefines void showContextHelp(); void cancelAutoRaise(); void destroyClient(); + void checkActiveModal(); private slots: void autoRaise(); @@ -423,7 +424,6 @@ class Client : public QObject, public KDecorationDefines void cleanGrouping(); void checkGroupTransients(); void setTransient( Window new_transient_for_id ); - void checkActiveModal(); Client* transient_for; Window transient_for_id; Window original_transient_for_id; diff --git a/manage.cpp b/manage.cpp index f845a7a5d5..7faf6bb81b 100644 --- a/manage.cpp +++ b/manage.cpp @@ -482,13 +482,14 @@ bool Client::manage( Window w, bool isMapped ) delete session; - checkActiveModal(); - ungrabXServer(); client_rules.discardTemporary(); updateWindowRules(); // was blocked while !isManaged() +// TODO there's a small problem here - isManaged() depends on the mapping state, +// but this client is not yet in Workspace's client list at this point, will +// be only done in addClient() return true; } diff --git a/workspace.cpp b/workspace.cpp index 172eb3537d..50bd445903 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -481,6 +481,7 @@ void Workspace::addClient( Client* c, allowed_t ) if( activeClient() == NULL && should_get_focus.count() == 0 ) activateClient( findDesktop( true, currentDesktop())); } + c->checkActiveModal(); checkTransients( c->window()); // SELI does this really belong here? updateStackingOrder( true ); // propagate new client if( c->isUtility() || c->isMenu() || c->isToolbar())