From a8fac1a9db36217c97007ee9422c9ed2f8702af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 24 May 2004 13:14:31 +0000 Subject: [PATCH] Avoid race condition with focus with 'kwin --replace'. svn path=/trunk/kdebase/kwin/; revision=314131 --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 5abed6d2ca..7526f3892a 100644 --- a/main.cpp +++ b/main.cpp @@ -33,6 +33,8 @@ License. See the file "COPYING" for the exact licensing terms. #undef INT8 #undef INT32 +extern Time qt_x_time; + namespace KWinInternal { @@ -123,7 +125,8 @@ Application::Application( ) Application::~Application() { delete Workspace::self(); - XSetInputFocus( qt_xdisplay(), PointerRoot, RevertToPointerRoot, CurrentTime ); + if( owner.ownerWindow() != None ) // if there was no --replace (no new WM) + XSetInputFocus( qt_xdisplay(), PointerRoot, RevertToPointerRoot, qt_x_time ); delete options; }