diff --git a/manage.cpp b/manage.cpp index 3e71644ced..68327829a9 100644 --- a/manage.cpp +++ b/manage.cpp @@ -131,6 +131,10 @@ bool Client::manage( Window w, bool isMapped ) if( session->userNoBorder ) setUserNoBorder( true ); } + + if( session && !session->shortcut.isNull()) + setShortcut( session->shortcut ); + // TODO use also rules for shortcut init_minimize = rules()->checkMinimize( init_minimize, !isMapped ); if( rules()->checkNoBorder( false, !isMapped )) diff --git a/sm.cpp b/sm.cpp index c281191468..308be65d90 100644 --- a/sm.cpp +++ b/sm.cpp @@ -113,6 +113,7 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase ) config->writeEntry( QString("skipPager")+n, c->skipPager() ); config->writeEntry( QString("userNoBorder")+n, c->isUserNoBorder() ); config->writeEntry( QString("windowType")+n, windowTypeToTxt( c->windowType())); + config->writeEntry( QString("shortcut")+n, c->shortcut().toStringInternal()); } } // TODO store also stacking order @@ -177,6 +178,7 @@ void Workspace::loadSessionInfo() info->skipPager = config->readBoolEntry( QString("skipPager")+n, FALSE ); info->userNoBorder = config->readBoolEntry( QString("userNoBorder")+n, FALSE ); info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n ).latin1()); + info->shortcut = KShortcut( config->readEntry( QString("shortcut")+n )); info->active = ( active_client == i ); } } diff --git a/sm.h b/sm.h index 42e7cba106..58105b00c1 100644 --- a/sm.h +++ b/sm.h @@ -15,6 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include class QSocketNotifier; @@ -45,6 +46,7 @@ struct SessionInfo bool skipPager; bool userNoBorder; NET::WindowType windowType; + KShortcut shortcut; bool active; // means 'was active in the saved session' };