From 25ccdb783f81a3d910b114a41904e4d47b642677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 6 Mar 2003 12:12:02 +0000 Subject: [PATCH] #55510 svn path=/trunk/kdebase/kwin/; revision=211733 --- client.cpp | 9 ++++++++- client.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index 46eff06421..dd2ff8087f 100644 --- a/client.cpp +++ b/client.cpp @@ -2137,9 +2137,16 @@ void Client::killWindow() // always kill this client at the server XKillClient(qt_xdisplay(), win ); - workspace()->destroyClient( this ); + // needs to be delayed, because this may be called from the client + // popup menu, and there may be possibly code still touching + // this instance after returning from killWindow() + QTimer::singleShot( 0, this, SLOT( destroyClient())); } +void Client::destroyClient() +{ + workspace()->destroyClient( this ); +} /*! diff --git a/client.h b/client.h index 113544e04d..0e3b5a9c4e 100644 --- a/client.h +++ b/client.h @@ -287,6 +287,9 @@ protected: NETWinInfo * netWinInfo(); +private slots: + void destroyClient(); + private: QSize sizeForWindowSize( const QSize&, bool ignore_height = FALSE ) const; void getWmNormalHints();