[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    KDE/kdebase/workspace/kwin
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2007-06-20 13:38:18
Message-ID: 1182346698.231800.10199.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 678025 by lunakl:

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



 M  +1 -1      clients/laptop/laptopclient.cpp  
 M  +2 -4      clients/modernsystem/modernsys.cpp  
 M  +1 -4      clients/plastik/plastik.cpp  
 M  +1 -4      clients/quartz/quartz.cpp  
 M  +1 -4      clients/web/Web.cpp  
 M  +1 -1      lib/kdecorationfactory.cpp  


--- trunk/KDE/kdebase/workspace/kwin/clients/laptop/laptopclient.cpp #678024:678025
@@ -703,7 +703,7 @@
     Laptop::create_pixmaps();
 
     bool needHardReset = true;
-    if (changed & SettingButtons) {
+    if ((changed & ~SettingButtons) == 0) {
 		// handled by KCommonDecoration
         needHardReset = false;
     }
--- trunk/KDE/kdebase/workspace/kwin/clients/modernsystem/modernsys.cpp #678024:678025
@@ -709,11 +709,9 @@
     {
         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;
--- trunk/KDE/kdebase/workspace/kwin/clients/plastik/plastik.cpp #678024:678025
@@ -118,12 +118,9 @@
     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) {
--- trunk/KDE/kdebase/workspace/kwin/clients/quartz/quartz.cpp #678024:678025
@@ -161,12 +161,9 @@
 
 	// 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) {
--- trunk/KDE/kdebase/workspace/kwin/clients/web/Web.cpp #678024:678025
@@ -341,12 +341,9 @@
 {
   // 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) {
--- trunk/KDE/kdebase/workspace/kwin/lib/kdecorationfactory.cpp #678024:678025
@@ -39,7 +39,7 @@
 
 bool KDecorationFactory::reset( unsigned long )
     {
-    return false;
+    return true;
     }
     
 bool KDecorationFactory::supports( Ability )
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic