Avoid race condition with focus with 'kwin --replace'.

svn path=/trunk/kdebase/kwin/; revision=314131
icc-effect-5.14.5
Luboš Luňák 2004-05-24 13:14:31 +00:00
parent b5181ba7f8
commit a8fac1a9db
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}