Make a difference between fake session data ('save window settings')

and real SM session data.

svn path=/trunk/kdebase/kwin/; revision=256749
This commit is contained in:
Luboš Luňák 2003-10-06 14:19:06 +00:00
parent 43ff6ea638
commit ee848958b3
3 changed files with 6 additions and 2 deletions

View file

@ -446,7 +446,7 @@ bool Client::manage( Window w, bool isMapped )
{
workspace()->restackClientUnderActive( this );
rawShow();
if( !session && ( !isSpecialWindow() || isOverride()))
if( ( !session || session->fake ) && ( !isSpecialWindow() || isOverride()))
demandAttention();
}
}
@ -455,7 +455,7 @@ bool Client::manage( Window w, bool isMapped )
{
virtualDesktopChange();
workspace()->raiseClient( this );
if( !session && !isMapped )
if( ( !session || session->fake ) && !isMapped )
demandAttention();
}
}

3
sm.cpp
View file

@ -178,6 +178,7 @@ void Workspace::loadSessionInfo()
info->userNoBorder = config->readBoolEntry( QString("userNoBorder")+n, FALSE );
info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n ).latin1());
info->active = ( active_client == i );
info->fake = false;
}
}
@ -212,6 +213,7 @@ void Workspace::loadFakeSessionInfo()
info->userNoBorder = config->readBoolEntry( QString("userNoBorder")+n, FALSE );
info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n ).latin1());
info->active = false;
info->fake = true;
}
}
@ -241,6 +243,7 @@ void Workspace::storeFakeSessionInfo( Client* c )
info->userNoBorder = c->isUserNoBorder();
info->windowType = c->windowType();
info->active = false;
info->fake = true;
}
void Workspace::writeFakeSessionInfo()

1
sm.h
View file

@ -46,6 +46,7 @@ struct SessionInfo
bool userNoBorder;
NET::WindowType windowType;
bool active; // means 'was active in the saved session', not used otherwise
bool fake; // fake session, i.e. 'save window settings', not SM restored
};