[fusion-commits] compiz mirror: Changes to 'master' (9d835866403f5884542958c936406b08bbdcbba2)

compiz at server.beryl-project.org compiz at server.beryl-project.org
Thu Jul 5 23:27:08 CEST 2007


New commits:
commit 9d835866403f5884542958c936406b08bbdcbba2
Author: Roland Bar <roland at verifysoft.de>
Date:   Thu Jul 5 17:18:31 2007 -0400

    remove NULL check

commit 1e76018140aebee54f635cc461e9b80ec7667ab1
Author: Roland Bar <roland at verifysoft.de>
Date:   Thu Jul 5 17:13:57 2007 -0400

    desktop is unsigned, always >= 0.

commit 68ac73cbce5ca098431a9020b2183bbf97288ae5
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 5 17:09:51 2007 -0400

    Remove unnecessary NULL check.


 kde/window-decorator/window.cpp |   40 +++++++++++++++++---------------------
 plugins/fuse.c                  |    9 ++-----
 src/screen.c                    |    2 +-
 3 files changed, 22 insertions(+), 29 deletions(-)


Modified: compiz/kde/window-decorator/window.cpp
===================================================================
--- compiz/kde/window-decorator/window.cpp
+++ compiz/kde/window-decorator/window.cpp
@@ -1377,36 +1377,32 @@ KWD::Window::updateProperty (void)
 
     if (mType == Normal || mType == Switcher)
     {
-	int topXOffset = w / 2;
+	int	topXOffset = w / 2;
+	QWidget *widget = mDecor->widget ();
+	int	x;
 
-	if (mDecor)
-	{
-	    QWidget *widget = mDecor->widget ();
-	    int	    x;
+	x = w - mContext.left_space - mContext.left_corner_space;
+	if (x > topXOffset)
+	    topXOffset = x;
 
-	    x = w - mContext.left_space - mContext.left_corner_space;
-	    if (x > topXOffset)
-		topXOffset = x;
+	if (widget)
+	{
+	    const QObjectList *children = widget->children ();
 
-	    if (widget)
+	    if (children)
 	    {
-		const QObjectList *children = widget->children ();
+		QWidget *child;
 
-		if (children)
+		for (QObjectListIt it(*children); it.current (); ++it)
 		{
-		    QWidget *child;
-
-		    for (QObjectListIt it(*children); it.current (); ++it)
-		    {
-			if (!it.current ()->isWidgetType ())
-			    continue;
+		    if (!it.current ()->isWidgetType ())
+			continue;
 
-			child = static_cast <QWidget *> (it.current ());
+		    child = static_cast <QWidget *> (it.current ());
 
-			x = child->x () - mBorder.left - 2;
-			if (x > w / 2 && x < topXOffset)
-			    topXOffset = x;
-		    }
+		    x = child->x () - mBorder.left - 2;
+		    if (x > w / 2 && x < topXOffset)
+			topXOffset = x;
 		}
 	    }
 	}

Modified: compiz/plugins/fuse.c
===================================================================
--- compiz/plugins/fuse.c
+++ compiz/plugins/fuse.c
@@ -196,13 +196,10 @@ fuseRemoveInode (FuseInode *parent,
 	    parent->child = NULL;
     }
 
-    if (inode)
-    {
-	if (inode->name)
-	    free (inode->name);
+    if (inode->name)
+	free (inode->name);
 
-	free (inode);
-    }
+    free (inode);
 }
 
 static FuseInode *

Modified: compiz/src/screen.c
===================================================================
--- compiz/src/screen.c
+++ compiz/src/screen.c
@@ -3606,7 +3606,7 @@ setCurrentDesktop (CompScreen   *s,
     unsigned long data;
     CompWindow    *w;
 
-    if (desktop < 0 || desktop >= s->nDesktop)
+    if (desktop >= s->nDesktop)
 	return;
 
     if (desktop == s->currentDesktop)


More information about the commits mailing list