diff -u -r1.58 frame.c
--- src/frame.c	8 Aug 2004 12:23:34 -0000	1.58
+++ src/frame.c	19 Aug 2004 11:48:51 -0000
@@ -26,6 +26,8 @@
 #include "errors.h"
 #include "keybindings.h"
 
+#include <X11/extensions/Xrender.h>
+
 #define EVENT_MASK (SubstructureRedirectMask |                     \
                     StructureNotifyMask | SubstructureNotifyMask | \
                     ExposureMask |                                 \
@@ -34,6 +36,41 @@
                     EnterWindowMask | LeaveWindowMask |            \
                     FocusChangeMask |                              \
                     ColormapChangeMask)
+static Visual *
+find_argb_visual (Display *dpy, int scr)
+{
+    XVisualInfo		*xvi;
+    XVisualInfo		template;
+    int			nvi;
+    int			i;
+    XRenderPictFormat	*format;
+    Visual		*visual;
+
+    template.screen = scr;
+    template.depth = 32;
+    template.class = TrueColor;
+    xvi = XGetVisualInfo (dpy, 
+			  VisualScreenMask |
+			  VisualDepthMask |
+			  VisualClassMask,
+			  &template,
+			  &nvi);
+    if (!xvi)
+	return 0;
+    visual = 0;
+    for (i = 0; i < nvi; i++)
+    {
+	format = XRenderFindVisualFormat (dpy, xvi[i].visual);
+	if (format->type == PictTypeDirect && format->direct.alphaMask)
+	{
+	    visual = xvi[i].visual;
+	    break;
+	}
+    }
+
+    XFree (xvi);
+    return visual;
+}
 
 void
 meta_window_ensure_frame (MetaWindow *window)
@@ -81,6 +118,12 @@
    */
 
   visual = 0;
+  
+  /* Attempt to find an ARGB visual if present, use the default
+     value of 0 otherwise. */
+  visual = find_argb_visual(window->display->xdisplay, 
+		  window->screen->number);
+  
   /* XXX special case for depth 32 windows (assumed to be ARGB) */
   if (window->depth == 32)
     visual = window->xvisual;  
diff -u -r1.75 frames.c
--- src/frames.c	24 Nov 2003 18:09:47 -0000	1.75
+++ src/frames.c	19 Aug 2004 11:48:51 -0000
@@ -268,10 +268,13 @@
 
   /* If a resize occurs it will cause a redraw, but the
    * resize may not actually be needed so we always redraw
-   * in case of color change.
+   * in case of color change. Don't change colour if this is
+   * an ARGB visual
    */
-  gtk_style_set_background (GTK_WIDGET (frames)->style,
-                            frame->window, GTK_STATE_NORMAL);
+  if(gdk_window_get_visual(frame->window)->depth != 32)
+      gtk_style_set_background (GTK_WIDGET (frames)->style,
+                                frame->window, GTK_STATE_NORMAL);
+
   gdk_window_invalidate_rect (frame->window, NULL, FALSE);
   meta_core_queue_frame_resize (gdk_display,
                                 frame->xwindow);
@@ -313,10 +316,14 @@
 
   /* If a resize occurs it will cause a redraw, but the
    * resize may not actually be needed so we always redraw
-   * in case of color change.
+   * in case of color change. Only redraw if it is not
+   * an ARGB visual however since we always want background
+   * in this case to be transparent.
    */
-  gtk_style_set_background (GTK_WIDGET (frames)->style,
-                            frame->window, GTK_STATE_NORMAL);
+  if(gdk_window_get_visual(frame->window)->depth != 32)
+      gtk_style_set_background (GTK_WIDGET (frames)->style,
+                                frame->window, GTK_STATE_NORMAL);
+
   gdk_window_invalidate_rect (frame->window, NULL, FALSE);
 }
 
@@ -469,6 +476,7 @@
 			   GdkWindow  *window)
 {
   MetaUIFrame *frame;
+  GdkColor col;
 
   g_assert (window);
 
@@ -477,9 +485,17 @@
   frame->window = window;
 
   gdk_window_set_user_data (frame->window, frames);
-  gtk_style_set_background (GTK_WIDGET (frames)->style,
-			    frame->window, GTK_STATE_NORMAL);
 
+  /* Set the window background to the current style if not ARGB and 
+   * transparent otherwise */
+  if(gdk_window_get_visual(frame->window)->depth != 32) {
+      gtk_style_set_background (GTK_WIDGET (frames)->style,
+                                frame->window, GTK_STATE_NORMAL);
+  } else {
+    col.pixel = 0;
+    gdk_window_set_background(window, &col);
+  }
+			    
   /* Don't set event mask here, it's in frame.c */
   
   frame->xwindow = xwindow;
@@ -613,7 +629,9 @@
 
   frame = meta_frames_lookup_window (frames, xwindow);
   
-  gtk_style_set_background (widget->style, frame->window, GTK_STATE_NORMAL);
+  if(gdk_window_get_visual(frame->window)->depth != 32) 
+      gtk_style_set_background (GTK_WIDGET (frames)->style,
+                                frame->window, GTK_STATE_NORMAL);
 }
 
 static void
diff -u -r1.70 theme.c
--- src/theme.c	10 Jan 2004 17:16:06 -0000	1.70
+++ src/theme.c	19 Aug 2004 11:48:52 -0000
@@ -2663,7 +2663,7 @@
   meta_color_spec_render (color_spec, widget, &color);
 
   values.foreground = color;
-  gdk_rgb_find_color (widget->style->colormap, &values.foreground);
+  gdk_rgb_find_color (gdk_drawable_get_colormap(drawable), &values.foreground);
   values.line_width = line_width;
 
   gc = gdk_gc_new_with_values (drawable, &values,
