Make sure desktop is active after startup if there's no other window active

svn path=/trunk/kdebase/kwin/; revision=266152
icc-effect-5.14.5
Luboš Luňák 2003-11-10 18:09:16 +00:00
parent 70645a691a
commit f8886f4f01
1 changed files with 6 additions and 5 deletions

View File

@ -423,7 +423,11 @@ void Workspace::addClient( Client* c, allowed_t )
grp->gotLeader( c );
if ( c->isDesktop() )
{
desktops.append( c );
if( active_client == NULL && should_get_focus.isEmpty() && c->isOnCurrentDesktop())
requestFocus( c ); // CHECKME? make sure desktop is active after startup if there's no other window active
}
else
{
if ( c->wantsTabFocus() && !focus_chain.contains( c ))
@ -1002,19 +1006,16 @@ bool Workspace::setCurrentDesktop( int new_desktop )
setActiveClient( NULL, Allowed );
if ( c )
{
requestFocus( c );
}
else
{
focusToNull();
}
if( !desktops.isEmpty() )
{
Window w_tmp;
int i_tmp;
XGetInputFocus( qt_xdisplay(), &w_tmp, &i_tmp );
if( w_tmp == null_focus_window )
if( w_tmp == null_focus_window ) // CHECKME?
requestFocus( findDesktop( true, currentDesktop()));
}