]> Pileus Git - ~andy/gtk/commitdiff
Always make offscreen window rgba
authorAlexander Larsson <alexl@redhat.com>
Mon, 13 Feb 2012 14:04:32 +0000 (15:04 +0100)
committerAlexander Larsson <alexl@redhat.com>
Mon, 13 Feb 2012 14:06:09 +0000 (15:06 +0100)
This fixes issues where the new default bg of transparent
didn't work, making offscreen windows black.

I don't think this is a practical performance problem.
Offscreen windows are rarely used and generally used for
graphics tricks like alpha anyway.

gdk/gdkoffscreenwindow.c

index bc91ac0da543fa9ec2e7b79f7b57ee77f4c6cde0..df88931f0e2113c1351ec8d24f56f9d7cd3b4428 100644 (file)
@@ -145,19 +145,12 @@ _gdk_offscreen_window_create_surface (GdkWindow *offscreen,
 {
   cairo_surface_t *similar;
   cairo_surface_t *surface;
-  cairo_content_t  content = CAIRO_CONTENT_COLOR;
 
   g_return_val_if_fail (GDK_IS_OFFSCREEN_WINDOW (offscreen->impl), NULL);
 
   similar = _gdk_window_ref_cairo_surface (offscreen->parent);
 
-  if (gdk_window_get_visual (offscreen) ==
-      gdk_screen_get_rgba_visual (gdk_window_get_screen (offscreen)))
-    {
-      content = CAIRO_CONTENT_COLOR_ALPHA;
-    }
-
-  surface = cairo_surface_create_similar (similar, content, width, height);
+  surface = cairo_surface_create_similar (similar, CAIRO_CONTENT_COLOR_ALPHA, width, height);
 
   cairo_surface_destroy (similar);