Index: nautilus//ChangeLog
===================================================================
RCS file: /export/cvs/gnome-2.0/nautilus/ChangeLog,v
retrieving revision 1.30
diff -p -u -5 -r1.30 ChangeLog
--- nautilus//ChangeLog	2002/04/18 21:39:28	1.30
+++ nautilus//ChangeLog	2002/04/19 06:31:54
@@ -1,5 +1,12 @@
+2002-04-19  Shivram U  <shivaram.upadhyayula@wipro.com>
+
+	* src/nautilus-desktop-window.c: (set_window_background) Dont not set
+	the pixmap if the depth of the widget window does not match with the
+	depth of the root window. If we do so, it results in a BadMatch X
+	Window System error. Fix for #78061
+
 2002-04-18  Michael Meeks  <michael@ximian.com>
 
 	* *.server.in, *.c: replace all the OAFIIDs with more
 	sensibly named ones, that follow the namespacing
 	guidelines in the libbonobo/docs/FAQ. Needs a new
Index: nautilus//src/nautilus-desktop-window.c
===================================================================
RCS file: /export/cvs/gnome-2.0/nautilus/src/nautilus-desktop-window.c,v
retrieving revision 1.1.1.1
diff -p -u -5 -r1.1.1.1 nautilus-desktop-window.c
--- nautilus//src/nautilus-desktop-window.c	2002/03/05 20:46:27	1.1.1.1
+++ nautilus//src/nautilus-desktop-window.c	2002/04/19 06:31:54
@@ -176,13 +176,20 @@ set_window_background (GtkWidget *widget
 	if (GTK_IS_WINDOW (widget)) {
 		gtk_widget_set_app_paintable (widget, TRUE);
 	}
 	
 	if (!already_have_root_bg) {
+		XWindowAttributes attributes;
+		gint root_depth;
+		gint window_depth = gdk_drawable_get_depth (widget->window);
+
 		have_pixel = FALSE;
 		already_have_root_bg = TRUE;
-		
+
+		XGetWindowAttributes (GDK_DISPLAY (), GDK_ROOT_WINDOW (), &attributes);
+		root_depth = attributes.depth;
+
 		/* We want to do this round-trip-to-server work only
 		 * for the first invocation, not on recursions
 		 */
 		
 		XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
@@ -190,11 +197,11 @@ set_window_background (GtkWidget *widget
 				    0L, 1L, False, XA_PIXMAP,
 				    &type, &format, &nitems, &bytes_after,
 				    &data);
   
 		if (type == XA_PIXMAP) {
-			if (format == 32 && nitems == 1 && bytes_after == 0) {
+			if (format == 32 && nitems == 1 && bytes_after == 0 && (window_depth == root_depth)) {
 				pixmap = *(Pixmap *) data;
 			}
   
 			XFree (data);
 		}
