--- clock.c.orig	Sun Mar  9 23:44:38 2003
+++ clock.c	Sun Mar  9 23:42:55 2003
@@ -426,6 +426,17 @@
 	update_clock (cd, current_time);
 }
 
+static gboolean
+debug_window_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+	GtkWidget **window = data;
+
+	gtk_widget_destroy(*window);
+	*window = NULL;
+
+	return TRUE;
+}
+
 static void
 applet_change_background (PanelApplet               *applet,
 			  PanelAppletBackgroundType  type,
@@ -445,9 +456,52 @@
 	} else if (type == PANEL_COLOR_BACKGROUND)
 		gtk_widget_modify_bg (cd->applet, GTK_STATE_NORMAL, color);
 
-	/* else if (type == PANEL_PIXMAP_BACKGROUND)
-	 * FIXME: Handle this when the panel support works again
-	 */
+	else if (type == PANEL_PIXMAP_BACKGROUND) {
+		gdk_window_set_back_pixmap(cd->applet->window, pixmap, TRUE);
+		if (1)
+			{
+			static GtkWidget *window = NULL;
+			static GtkWidget *image = NULL;
+			static GtkWidget *counter = NULL;
+			static gint count = 0;
+			gchar *text;
+			gint sw, sh;
+			gint aw, ah;
+
+			if (!window)
+				{
+				GtkWidget *vbox;
+				window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+				g_signal_connect(GTK_OBJECT(window), "delete_event",
+						 G_CALLBACK(debug_window_delete_cb), &window);
+				
+				vbox = gtk_vbox_new(FALSE, 0);
+				gtk_container_add(GTK_CONTAINER(window), vbox);
+				gtk_widget_show(vbox);
+
+				image = gtk_image_new();
+				gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0);
+				gtk_widget_show(image);
+
+				counter = gtk_label_new("");
+				gtk_box_pack_start(GTK_BOX(vbox), counter, FALSE, FALSE, 0);
+				gtk_widget_show(counter);
+
+				gtk_widget_show(window);
+				}
+
+			aw = cd->applet->allocation.width;
+			ah = cd->applet->allocation.height;
+
+			gdk_drawable_get_size(pixmap, &sw, &sh);
+			gtk_image_set_from_pixmap(GTK_IMAGE(image), pixmap, NULL);
+
+			count++;
+			text = g_strdup_printf("count: %d, source: %dx%d, applet: %d x %d", count, sw, sh, aw, ah);
+			gtk_label_set_text(GTK_LABEL(counter), text);
+			g_free(text);
+			}
+	}
 }
 
 
