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

[stable] Backport of gnome-panel bug fix in sarge



        Hi,

 I would like to upload a backport of a bug fix in gnome-panel, the
 upstream bug is <http://bugzilla.gnome.org/show_bug.cgi?id=121492>, the
 backports was proposed in august on the GNOME distributor list where we
 discuss important bug fix to backport for legacy support of some GNOME
 releases:
 <http://mail.gnome.org/archives/distributor-list/2006-August/msg00001.html>

 I'm attaching the interdiff; I've prepared an upload for testing at
 <http://people.dooz.org/~lool/debian/gnome-panel/2.8.3-2/sarge-pbuilder/>.

    Bye,
-- 
Loïc Minier <lool@dooz.org>
--- gnome-panel-2.8.3/debian/changelog
+++ gnome-panel-2.8.3/debian/changelog
@@ -1,3 +1,10 @@
+gnome-panel (2.8.3-2) stable; urgency=medium
+
+  * New patch, 20_screenshot-overlapped-windows, to fix screenshots of
+    overlapping windows; backported from GNOME #121492.
+
+ -- Loic Minier <lool@dooz.org>  Thu,  8 Mar 2007 10:51:49 +0100
+
 gnome-panel (2.8.3-1) unstable; urgency=medium
 
   * Marc Dequènes:
--- gnome-panel-2.8.3.orig/debian/patches/20_screenshot-overlapped-windows.patch
+++ gnome-panel-2.8.3/debian/patches/20_screenshot-overlapped-windows.patch
@@ -0,0 +1,79 @@
+Backported from GNOME #121492; fixes screenshot of overlapping windows.
+
+--- gnome-panel-2.8.1.old/gnome-panel/gnome-panel-screenshot.c	2004-08-08 23:21:58.000000000 +0100
++++ gnome-panel-2.8.1/gnome-panel/gnome-panel-screenshot.c	2006-08-24 14:06:07.000000000 +0100
+@@ -807,14 +807,13 @@ find_toplevel_window (int depth, Window 
+ static gboolean
+ take_window_shot (void)
+ {
+-	GdkWindow *window, *toplevel_window;
++	GdkWindow *window, *toplevel_window, *root_w;
+ 	Display *disp;
+ 	Window w, root, child, toplevel;
+ 	int unused;
+ 	guint mask;
+ 	gint x_real_orig, y_real_orig;
+ 	gint x_orig, y_orig;
+-	gint x = 0, y = 0;
+ 	gint real_width, real_height;
+ 	gint width, height;
+ 	XClassHint class_hint;
+@@ -873,6 +872,7 @@ take_window_shot (void)
+ 		gdk_window_show (toplevel_window);
+ 	}
+ 
++	root_w = gdk_window_foreign_new (GDK_ROOT_WINDOW ());
+ 	gdk_drawable_get_size (window, &real_width, &real_height);
+ 	gdk_window_get_origin (window, &x_real_orig, &y_real_orig);
+ 
+@@ -882,12 +882,10 @@ take_window_shot (void)
+ 	height = real_height;
+ 	
+ 	if (x_orig < 0) {
+-		x = - x_orig;
+ 		width = width + x_orig;
+ 		x_orig = 0;
+ 	}
+ 	if (y_orig < 0) {
+-		y = - y_orig;
+ 		height = height + y_orig;
+ 		y_orig = 0;
+ 	}
+@@ -899,8 +897,8 @@ take_window_shot (void)
+ 
+ 
+ #ifdef HAVE_X11_EXTENSIONS_SHAPE_H
+-	tmp = gdk_pixbuf_get_from_drawable (NULL, window, NULL,
+-					    x, y, 0, 0,
++	tmp = gdk_pixbuf_get_from_drawable (NULL, root_w, NULL,
++					    x_orig, y_orig, 0, 0,
+ 					    width, height);
+ 
+ 	rectangles = XShapeGetRectangles (GDK_DISPLAY (), GDK_WINDOW_XWINDOW (window),
+@@ -915,6 +913,7 @@ take_window_shot (void)
+ 		for (i = 0; i < rectangle_count; i++) {
+ 			gint rec_x, rec_y;
+ 			gint rec_width, rec_height;
++			gint y;
+ 
+ 			rec_x = rectangles[i].x;
+ 			rec_y = rectangles[i].y;
+@@ -939,6 +938,7 @@ take_window_shot (void)
+ 
+ 			for (y = rec_y; y < rec_y + rec_height; y++) {
+ 				guchar *src_pixels, *dest_pixels;
++				gint x;
+ 				
+ 				src_pixels = gdk_pixbuf_get_pixels (tmp) +
+ 					y * gdk_pixbuf_get_rowstride(tmp) +
+@@ -963,8 +963,8 @@ take_window_shot (void)
+ 		screenshot = tmp;
+ 	}
+ #else /* HAVE_X11_EXTENSIONS_SHAPE_H */
+-	screenshot = gdk_pixbuf_get_from_drawable (NULL, window, NULL,
+-						   x, y, 0, 0,
++	screenshot = gdk_pixbuf_get_from_drawable (NULL, root_w, NULL,
++						   x_orig, y_orig, 0, 0,
+ 						   width, height);
+ #endif /* HAVE_X11_EXTENSIONS_SHAPE_H */
+ 

Reply to: