summaryrefslogtreecommitdiff
path: root/gdk/gdkoffscreenwindow.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-02-13 15:04:32 +0100
committerAlexander Larsson <alexl@redhat.com>2012-02-13 15:06:09 +0100
commit42c2d51ad958a02d7531929e2827296ec04568bd (patch)
treeafe8974cc5053374cce8f8521b747c52c6d8649a /gdk/gdkoffscreenwindow.c
parent2d972058ab5e137461c94e2f7df3ef92c032b641 (diff)
downloadgtk+-42c2d51ad958a02d7531929e2827296ec04568bd.tar.gz
Always make offscreen window rgba
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.
Diffstat (limited to 'gdk/gdkoffscreenwindow.c')
-rw-r--r--gdk/gdkoffscreenwindow.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index bc91ac0da5..df88931f0e 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -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);