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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kwin
From:       Robin Harold Burchell <viroteck () viroteck ! net>
Date:       2009-09-11 23:44:30
Message-ID: 1252712670.794828.28412.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1022531 by rhburchell:

A number of small warning fixes (bracketing, etc) to help pick up real problems when working.


 M  +3 -3      client.cpp  
 M  +1 -1      events.cpp  
 M  +4 -0      main.cpp  
 M  +3 -0      options.cpp  
 M  +5 -5      scene_opengl.cpp  
 M  +4 -4      scene_xrender.cpp  


--- trunk/KDE/kdebase/workspace/kwin/client.cpp #1022530:1022531
@@ -114,13 +114,13 @@
     , border_right( 0 )
     , border_top( 0 )
     , border_bottom( 0 )
-    , sm_stacking_order( -1 )
-    , demandAttentionKNotifyTimer( NULL )
-    , paintRedirector( 0 )
     , padding_left( 0 )
     , padding_right( 0 )
     , padding_top( 0 )
     , padding_bottom( 0 )
+    , sm_stacking_order( -1 )
+    , demandAttentionKNotifyTimer( NULL )
+    , paintRedirector( 0 )
     , electricMaximizing( false )
     { // TODO: Do all as initialization
 
--- trunk/KDE/kdebase/workspace/kwin/events.cpp #1022530:1022531
@@ -478,7 +478,7 @@
         case Expose:
             if( compositing()
                 && ( e->xexpose.window == rootWindow()  // root window needs repainting
-                    || overlay != None && e->xexpose.window == overlay )) // overlay needs repainting
+                    || (overlay != None && e->xexpose.window == overlay) )) // overlay needs repainting
                 {
                 addRepaint( e->xexpose.x, e->xexpose.y, e->xexpose.width, e->xexpose.height );
                 }
--- trunk/KDE/kdebase/workspace/kwin/main.cpp #1022530:1022531
@@ -77,6 +77,9 @@
  */
 static bool kwin_sync = false;
 
+// errorMessage is only used ifndef NDEBUG, and only in one place.
+// it might be worth reevaluating why this is used? I don't know.
+#ifndef NDEBUG
 /**
  * Outputs: "Error: <error> (<value>), Request: <request>(<value>), Resource: <value>"
  */
@@ -161,6 +164,7 @@
         }
     return ret;
     }
+#endif
 
 static int x11ErrorHandler( Display* d, XErrorEvent* e )
     {
--- trunk/KDE/kdebase/workspace/kwin/options.cpp #1022530:1022531
@@ -366,6 +366,9 @@
             return electric_border_left;
         case ElectricTopLeft:
             return electric_border_top_left;
+        default:
+            // fallthrough
+            break;
         }
     return ElectricActionNone;
     }
--- trunk/KDE/kdebase/workspace/kwin/scene_opengl.cpp #1022530:1022531
@@ -1356,8 +1356,8 @@
     {
     // check if there is something to paint (e.g. don't paint if the window
     // is only opaque and only PAINT_WINDOW_TRANSLUCENT is requested)
+    /* HACK: It seems this causes painting glitches, disable temporarily
     bool opaque = isOpaque() && data.opacity == 1.0;
-    /* HACK: It seems this causes painting glitches, disable temporarily
     if(( mask & PAINT_WINDOW_OPAQUE ) ^ ( mask & PAINT_WINDOW_TRANSLUCENT ))
         { // We are only painting either opaque OR translucent windows, not both
         if( mask & PAINT_WINDOW_OPAQUE && !opaque )
@@ -1458,10 +1458,10 @@
         {
         bool noBorder = true;
         bool updateDeco = false;
-        const QPixmap *left;
-        const QPixmap *top;
-        const QPixmap *right;
-        const QPixmap *bottom;
+        const QPixmap *left = NULL;
+        const QPixmap *top = NULL;
+        const QPixmap *right = NULL;
+        const QPixmap *bottom = NULL;
         QRect topRect, leftRect, rightRect, bottomRect;
         if( client && !client->noBorder() )
             {
--- trunk/KDE/kdebase/workspace/kwin/scene_xrender.cpp #1022530:1022531
@@ -743,10 +743,10 @@
         if( client || deleted )
             {
             bool noBorder = true;
-            const QPixmap *left;
-            const QPixmap *top;
-            const QPixmap *right;
-            const QPixmap *bottom;
+            const QPixmap *left = NULL;
+            const QPixmap *top = NULL;
+            const QPixmap *right = NULL;
+            const QPixmap *bottom = NULL;
             QRect tr, lr, rr, br;
             QRect decorationRect;
             if( client && !client->noBorder() )
[prev in list] [next in list] [prev in thread] [next in thread] 

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