From ee848958b38d42ecf74eccb3c944329ea163a110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 6 Oct 2003 14:19:06 +0000 Subject: [PATCH] Make a difference between fake session data ('save window settings') and real SM session data. svn path=/trunk/kdebase/kwin/; revision=256749 --- manage.cpp | 4 ++-- sm.cpp | 3 +++ sm.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manage.cpp b/manage.cpp index 02f7ef47b4..10f28e194f 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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(); } } diff --git a/sm.cpp b/sm.cpp index 50f81ec676..41d56983e1 100644 --- a/sm.cpp +++ b/sm.cpp @@ -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() diff --git a/sm.h b/sm.h index 5d19a5cc4f..2ed44f3a8d 100644 --- a/sm.h +++ b/sm.h @@ -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 };