From 6261311a6942cd5adc75fb9246fdcefb7f465212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 2 Apr 2001 22:12:54 +0000 Subject: [PATCH] I think I've finally found the right place for the propagateClients() call. Now KWinModule will emit windowAdded() after all properties are set correctly, but still before activeWindowChanged(). If it breaks something, beat me. svn path=/trunk/kdebase/kwin/; revision=90016 --- client.cpp | 1 + workspace.cpp | 9 ++++++++- workspace.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index a528270f30..b8def74d4d 100644 --- a/client.cpp +++ b/client.cpp @@ -756,6 +756,7 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial ) delete session; sendSyntheticConfigureNotify(); + workspace()->clientReady( this ); // will call Workspace::propagateClients() if ( showMe && !doNotShow ) { Events::raise( isTransient() ? Events::TransNew : Events::New ); diff --git a/workspace.cpp b/workspace.cpp index 4667b9a9d2..8ab2ce74de 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -495,7 +495,6 @@ bool Workspace::workspaceEvent( XEvent * e ) } } if ( c ) { - propagateClients(); bool result = c->windowEvent( e ); if ( c == desktop_client ) setDesktopClient( c ); @@ -2173,6 +2172,14 @@ bool Workspace::netCheck( XEvent* e ) return dirty != 0; } +/*! + Called when a newly mapped client is ready ( has properties set correctly ) + */ +void Workspace::clientReady( Client* ) +{ + propagateClients(); +} + /*! Propagates the managed clients to the world */ diff --git a/workspace.h b/workspace.h index f9fa8dbe51..7b56e27bc4 100644 --- a/workspace.h +++ b/workspace.h @@ -133,6 +133,8 @@ public: void raiseOrLowerClient( Client * ); void clientHidden( Client* ); + + void clientReady( Client* ); /** * Returns the current virtual desktop of this workspace