From 8255bc2749f88bdea8258df891254e36a89bfe6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 4 Nov 2004 17:56:05 +0000 Subject: [PATCH] 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 --- client.h | 2 +- manage.cpp | 5 +++-- workspace.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) 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())