[maemo-commits] [maemo-commits] r11956 - in projects/haf/trunk/hildon-desktop: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue May 29 18:09:03 EEST 2007
Author: jobi
Date: 2007-05-29 18:09:02 +0300 (Tue, 29 May 2007)
New Revision: 11956

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/src/hd-panel-window.c
Log:

2007-05-29  Johan Bilien  <johan.bilien at nokia.com>

	* src/hd-panel-window.c:
	- paint the background and the children even if the composite
	extension is not available



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-05-29 15:05:32 UTC (rev 11955)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-05-29 15:09:02 UTC (rev 11956)
@@ -1,3 +1,9 @@
+2007-05-29  Johan Bilien  <johan.bilien at nokia.com>
+
+	* src/hd-panel-window.c:
+	- paint the background and the children even if the composite
+	extension is not available
+
 2007-05-29  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hd-desktop.c: read new configuration key "X-Is-Ordered" to

Modified: projects/haf/trunk/hildon-desktop/src/hd-panel-window.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-panel-window.c	2007-05-29 15:05:32 UTC (rev 11955)
+++ projects/haf/trunk/hildon-desktop/src/hd-panel-window.c	2007-05-29 15:09:02 UTC (rev 11956)
@@ -288,35 +288,33 @@
   if (GTK_WIDGET_DRAWABLE (widget))
   {
     HDPanelWindowPrivate       *priv = HD_PANEL_WINDOW (widget)->priv;
+    GdkDrawable *drawable;
+    gint x_offset, y_offset;
+    gint x, y;
+    Picture picture;
+    GdkVisual *visual;
+    XRenderPictFormat *format;
+    XRenderPictureAttributes pa = {0};
 
-    if (priv->home_picture != None)
-    {
-      GdkDrawable *drawable;
-      gint x_offset, y_offset;
-      gint x, y;
-      Picture picture;
-      GdkVisual *visual;
-      XRenderPictFormat *format;
-      XRenderPictureAttributes pa = {0};
+    gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
 
-      gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
+    gdk_window_get_internal_paint_info (widget->window,
+                                        &drawable,
+                                        &x_offset,
+                                        &y_offset);
 
-      gdk_window_get_internal_paint_info (widget->window,
-                                          &drawable,
-                                          &x_offset,
-                                          &y_offset);
+    visual = gdk_drawable_get_visual (drawable);
 
-      visual = gdk_drawable_get_visual (drawable);
+    format = XRenderFindVisualFormat (GDK_DISPLAY (),
+                                      GDK_VISUAL_XVISUAL (visual));
 
-      format = XRenderFindVisualFormat (GDK_DISPLAY (),
-                                        GDK_VISUAL_XVISUAL (visual));
+    picture = XRenderCreatePicture (GDK_DISPLAY (),
+                                    GDK_DRAWABLE_XID (drawable),
+                                    format,
+                                    0,
+                                    &pa);
 
-      picture = XRenderCreatePicture (GDK_DISPLAY (),
-                                      GDK_DRAWABLE_XID (drawable),
-                                      format,
-                                      0,
-                                      &pa);
-
+    if (priv->home_picture != None)
       XRenderComposite (GDK_DISPLAY (),
                         PictOpSrc,
                         priv->home_picture,
@@ -329,30 +327,29 @@
                         event->area.width,
                         event->area.height);
 
-      if (priv->background_picture != None)
-        XRenderComposite (GDK_DISPLAY (),
-                          PictOpOver,
-                          priv->background_picture,
-                          priv->background_mask,
-                          picture,
-                          x + event->area.x, y + event->area.y,
-                          x + event->area.x, y + event->area.y,
-                          event->area.x - x_offset,
-                          event->area.y - y_offset,
-                          event->area.width,
-                          event->area.height);
+    if (priv->background_picture != None)
+      XRenderComposite (GDK_DISPLAY (),
+                        PictOpOver,
+                        priv->background_picture,
+                        priv->background_mask,
+                        picture,
+                        x + event->area.x, y + event->area.y,
+                        x + event->area.x, y + event->area.y,
+                        event->area.x - x_offset,
+                        event->area.y - y_offset,
+                        event->area.width,
+                        event->area.height);
 
 
-      XRenderFreePicture (GDK_DISPLAY (),
-                          picture);
+    XRenderFreePicture (GDK_DISPLAY (),
+                        picture);
 
-      return GTK_WIDGET_CLASS (hd_panel_window_parent_class)->
-          expose_event (widget, event);
+    return GTK_WIDGET_CLASS (hd_panel_window_parent_class)->
+        expose_event (widget, event);
 
-    }
   }
 
-  return FALSE;
+return FALSE;
 }
 
 static GdkFilterReturn


More information about the maemo-commits mailing list