Make sure that when calling Workspace::clientHidden(), the client is really
hidden, otherwise it could attempt to restore the focus back to this client. CCMAIL: 66926-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=263383icc-effect-5.14.5
parent
f7a59dfd24
commit
b878ad84d9
|
@ -343,6 +343,7 @@ extern bool block_focus; // SELI
|
||||||
|
|
||||||
void Workspace::clientHidden( Client* c )
|
void Workspace::clientHidden( Client* c )
|
||||||
{
|
{
|
||||||
|
assert( !c->isShown( true ) || !c->isOnCurrentDesktop());
|
||||||
if( !( c == active_client
|
if( !( c == active_client
|
||||||
|| ( should_get_focus.count() > 0 && c == should_get_focus.last())))
|
|| ( should_get_focus.count() > 0 && c == should_get_focus.last())))
|
||||||
return;
|
return;
|
||||||
|
@ -378,13 +379,10 @@ void Workspace::clientHidden( Client* c )
|
||||||
if( get_focus == NULL )
|
if( get_focus == NULL )
|
||||||
get_focus = *it;
|
get_focus = *it;
|
||||||
}
|
}
|
||||||
|
if( get_focus == NULL )
|
||||||
|
get_focus = findDesktop( true, currentDesktop());
|
||||||
if( get_focus != NULL )
|
if( get_focus != NULL )
|
||||||
{
|
|
||||||
requestFocus( get_focus );
|
requestFocus( get_focus );
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ( !desktops.isEmpty() )
|
|
||||||
requestFocus( findDesktop( true, currentDesktop()));
|
|
||||||
else
|
else
|
||||||
focusToNull();
|
focusToNull();
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,6 +172,7 @@ void Client::releaseWindow( bool on_shutdown )
|
||||||
if (moveResizeMode)
|
if (moveResizeMode)
|
||||||
leaveMoveResize();
|
leaveMoveResize();
|
||||||
setModal( false ); // otherwise its mainwindow wouldn't get focus
|
setModal( false ); // otherwise its mainwindow wouldn't get focus
|
||||||
|
hidden = true; // so that it's not considered visible anymore
|
||||||
if( !on_shutdown )
|
if( !on_shutdown )
|
||||||
workspace()->clientHidden( this );
|
workspace()->clientHidden( this );
|
||||||
destroyDecoration();
|
destroyDecoration();
|
||||||
|
@ -212,6 +213,7 @@ void Client::destroyClient()
|
||||||
leaveMoveResize();
|
leaveMoveResize();
|
||||||
++block_geometry;
|
++block_geometry;
|
||||||
setModal( false );
|
setModal( false );
|
||||||
|
hidden = true; // so that it's not considered visible anymore
|
||||||
workspace()->clientHidden( this );
|
workspace()->clientHidden( this );
|
||||||
destroyDecoration();
|
destroyDecoration();
|
||||||
cleanGrouping();
|
cleanGrouping();
|
||||||
|
|
Loading…
Reference in New Issue