[maemo-commits] [maemo-commits] r18195 - in projects/haf/trunk/libmatchbox2: . matchbox/client-types matchbox/theme-engines

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Apr 30 10:17:02 EEST 2009
Author: kihamala
Date: 2009-04-30 10:16:59 +0300 (Thu, 30 Apr 2009)
New Revision: 18195

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-input.c
   projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c
Log:
coverity fix + remove FIXME'd code


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-04-29 18:04:45 UTC (rev 18194)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-04-30 07:16:59 UTC (rev 18195)
@@ -1,3 +1,11 @@
+2009-04-30  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	* matchbox/client-types/mb-wm-client-input.c
+	(mb_wm_client_input_init): Check return value of
+	mb_wm_managed_client_from_xwindow to shut up Coverity.
+	* matchbox/theme-engines/mb-wm-theme.c (mb_wm_theme_new): Remove code
+	marked with FIXME since the theme package seems to be OK now.
+
 2009-04-29  Marc Ordinas i Llopis  <marc.ordinasillopis at collabora.co.uk>
 
 	Fixed handling of _NET_WM_PID property.

Modified: projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-input.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-input.c	2009-04-29 18:04:45 UTC (rev 18194)
+++ projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-input.c	2009-04-30 07:16:59 UTC (rev 18195)
@@ -59,10 +59,13 @@
 	mb_wm_managed_client_from_xwindow (wm,
 					   win->xwin_transient_for);
 
-      mb_wm_client_get_coverage (t, & client_input->transient_geom);
+      if (t) /* silence Coverity */
+      {
+        mb_wm_client_get_coverage (t, & client_input->transient_geom);
 
-      MBWM_DBG ("Adding to '%lx' transient list", win->xwin_transient_for);
-      mb_wm_client_add_transient (t, client);
+        MBWM_DBG ("Adding to '%lx' transient list", win->xwin_transient_for);
+        mb_wm_client_add_transient (t, client);
+      }
       client->stacking_layer = 0;  /* We stack with whatever transient too */
     }
   else

Modified: projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c	2009-04-29 18:04:45 UTC (rev 18194)
+++ projects/haf/trunk/libmatchbox2/matchbox/theme-engines/mb-wm-theme.c	2009-04-30 07:16:59 UTC (rev 18195)
@@ -473,20 +473,6 @@
 	  if (stat (path, &st))
 	    path = NULL;
 	}
-
-      /* FIXME: temporary fallback for the time before theme package update
-       */
-      if (!path)
-	{
-	  const char * fmt = "%s/themes/%s/matchbox/theme.xml";
-
-	  size = strlen (theme_path) + strlen (fmt) + strlen (DATADIR);
-	  path = alloca (size);
-	  snprintf (path, size, fmt, DATADIR, theme_path);
-
-	  if (stat (path, &st))
-	    path = NULL;
-	}
     }
 
   if (path)


More information about the maemo-commits mailing list