[gnome-panel/gtk3] panel-background-monitor: Initialize pwidth and pheight when there's a monitor surface



commit 652a565205e7b0e93a22b460676dd8909eb5cc6c
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Fri Jan 28 18:04:08 2011 +0100

    panel-background-monitor: Initialize pwidth and pheight when there's a monitor surface

 gnome-panel/panel-background-monitor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/panel-background-monitor.c b/gnome-panel/panel-background-monitor.c
index 700b14b..5d2612c 100644
--- a/gnome-panel/panel-background-monitor.c
+++ b/gnome-panel/panel-background-monitor.c
@@ -415,6 +415,9 @@ panel_background_monitor_setup_pixbuf (PanelBackgroundMonitor *monitor)
                                                                  &pwidth, &pheight);
               if (!monitor->surface)
                       g_warning ("couldn't get background pixmap\n");
+        } else {
+                pwidth = cairo_image_surface_get_width (monitor->surface);
+                pheight = cairo_image_surface_get_height (monitor->surface);
         }
 
 	if (!monitor->surface) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]