Save window shortcut also in session.
svn path=/trunk/kdebase/kwin/; revision=375459
This commit is contained in:
parent
d04ce83410
commit
83e4a1d222
3 changed files with 8 additions and 0 deletions
|
@ -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 ))
|
||||
|
|
2
sm.cpp
2
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 );
|
||||
}
|
||||
}
|
||||
|
|
2
sm.h
2
sm.h
|
@ -15,6 +15,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include <X11/SM/SMlib.h>
|
||||
#include <kapplication.h>
|
||||
#include <netwm_def.h>
|
||||
#include <kshortcut.h>
|
||||
|
||||
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'
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue