Client::isManaged() should not be true before it's added to the client

list :(. At least work around a possible desktop switching and invisible
window because of this.

svn path=/trunk/kdebase/kwin/; revision=360436
This commit is contained in:
Luboš Luňák 2004-11-04 17:56:05 +00:00
parent 9ff5419637
commit 8255bc2749
3 changed files with 5 additions and 3 deletions

View file

@ -273,6 +273,7 @@ class Client : public QObject, public KDecorationDefines
void showContextHelp(); void showContextHelp();
void cancelAutoRaise(); void cancelAutoRaise();
void destroyClient(); void destroyClient();
void checkActiveModal();
private slots: private slots:
void autoRaise(); void autoRaise();
@ -423,7 +424,6 @@ class Client : public QObject, public KDecorationDefines
void cleanGrouping(); void cleanGrouping();
void checkGroupTransients(); void checkGroupTransients();
void setTransient( Window new_transient_for_id ); void setTransient( Window new_transient_for_id );
void checkActiveModal();
Client* transient_for; Client* transient_for;
Window transient_for_id; Window transient_for_id;
Window original_transient_for_id; Window original_transient_for_id;

View file

@ -482,13 +482,14 @@ bool Client::manage( Window w, bool isMapped )
delete session; delete session;
checkActiveModal();
ungrabXServer(); ungrabXServer();
client_rules.discardTemporary(); client_rules.discardTemporary();
updateWindowRules(); // was blocked while !isManaged() 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; return true;
} }

View file

@ -481,6 +481,7 @@ void Workspace::addClient( Client* c, allowed_t )
if( activeClient() == NULL && should_get_focus.count() == 0 ) if( activeClient() == NULL && should_get_focus.count() == 0 )
activateClient( findDesktop( true, currentDesktop())); activateClient( findDesktop( true, currentDesktop()));
} }
c->checkActiveModal();
checkTransients( c->window()); // SELI does this really belong here? checkTransients( c->window()); // SELI does this really belong here?
updateStackingOrder( true ); // propagate new client updateStackingOrder( true ); // propagate new client
if( c->isUtility() || c->isMenu() || c->isToolbar()) if( c->isUtility() || c->isMenu() || c->isToolbar())