Interesting way of checking if a decoration needs a hard reset - as soon
as one thing that does not need it has changed, it is not needed, regardless of the rest. Even more interestingly several styles have exactly the same copy of this nonsense. CCMAIL: kwin@kde.org svn path=/trunk/KDE/kdebase/workspace/; revision=678025
This commit is contained in:
parent
ef59c8956a
commit
cc091a7704
6 changed files with 7 additions and 18 deletions
|
@ -703,7 +703,7 @@ bool LaptopClientFactory::reset(unsigned long changed)
|
|||
Laptop::create_pixmaps();
|
||||
|
||||
bool needHardReset = true;
|
||||
if (changed & SettingButtons) {
|
||||
if ((changed & ~SettingButtons) == 0) {
|
||||
// handled by KCommonDecoration
|
||||
needHardReset = false;
|
||||
}
|
||||
|
|
|
@ -709,11 +709,9 @@ bool ModernSysFactory::reset( unsigned long changed )
|
|||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
needHardReset = false;
|
||||
} else if (changed & SettingButtons) {
|
||||
// handled by KCommonDecoration
|
||||
needHardReset = false;
|
||||
}
|
||||
if( ( changed & ~(SettingColors | SettingBorder | SettingFont | SettingButtons)) == 0 )
|
||||
needHardReset = false;
|
||||
|
||||
if( needHardReset )
|
||||
return true;
|
||||
|
|
|
@ -118,12 +118,9 @@ bool PlastikHandler::reset(unsigned long changed)
|
|||
bool needHardReset = true;
|
||||
// TODO: besides the Color and Font settings I can maybe handle more changes
|
||||
// without a hard reset. I will do this later...
|
||||
if (changed & SettingColors || changed & SettingFont)
|
||||
if ((changed & ~(SettingColors | SettingFont | SettingButtons)) == 0 )
|
||||
{
|
||||
needHardReset = false;
|
||||
} else if (changed & SettingButtons) {
|
||||
// handled by KCommonDecoration
|
||||
needHardReset = false;
|
||||
}
|
||||
|
||||
if (needHardReset) {
|
||||
|
|
|
@ -161,12 +161,9 @@ bool QuartzHandler::reset(unsigned long changed)
|
|||
|
||||
// Do we need to "hit the wooden hammer" ?
|
||||
bool needHardReset = true;
|
||||
if (changed & SettingColors)
|
||||
if ((changed & ~(SettingColors | SettingButtons)) == 0)
|
||||
{
|
||||
needHardReset = false;
|
||||
} else if (changed & SettingButtons) {
|
||||
// handled by KCommonDecoration
|
||||
needHardReset = false;
|
||||
}
|
||||
|
||||
if (needHardReset) {
|
||||
|
|
|
@ -341,12 +341,9 @@ bool WebFactory::reset(unsigned long changed)
|
|||
{
|
||||
// Do we need to "hit the wooden hammer" ?
|
||||
bool needHardReset = true;
|
||||
if (changed & SettingColors || changed & SettingFont)
|
||||
if ((changed & ~(SettingColors | SettingFont | SettingButtons)) == 0 )
|
||||
{
|
||||
needHardReset = false;
|
||||
} else if (changed & SettingButtons) {
|
||||
// handled by KCommonDecoration
|
||||
needHardReset = false;
|
||||
}
|
||||
|
||||
if (needHardReset) {
|
||||
|
|
|
@ -39,7 +39,7 @@ KDecorationFactory::~KDecorationFactory()
|
|||
|
||||
bool KDecorationFactory::reset( unsigned long )
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool KDecorationFactory::supports( Ability )
|
||||
|
|
Loading…
Reference in a new issue