summaryrefslogtreecommitdiff
path: root/gtk/gtkviewport.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-02-09 16:38:54 +0100
committerAlexander Larsson <alexl@redhat.com>2012-02-09 16:39:23 +0100
commitfed1cfb12293cc8995278d5657d0d49c742f416e (patch)
tree65015551dd03d79457406b8d802bc5c7c09bb97c /gtk/gtkviewport.c
parent6723feae8a314b806ff783507182208107e08007 (diff)
downloadgtk+-fed1cfb12293cc8995278d5657d0d49c742f416e.tar.gz
Make the default background for GdkWindows transparent
With the changes in default CSS to make the default background transparent we ran into issues where intermediate GdkWindow (for instance the view_window in GtkViewport) where we didn't set an explicit background (because before they were always covered). So instead of showing throught the transparent windows were showing the default backgroind of the intermediate window (i.e. black). With this change we also needed to fix GtkViewport, as it was previously relying on the bin and view windows to cover widget->window so that the border was not visible if shadow_type was NONE.
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r--gtk/gtkviewport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 73238ee8b8..6476988beb 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -755,7 +755,8 @@ gtk_viewport_draw (GtkWidget *widget,
context = gtk_widget_get_style_context (widget);
- if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
+ if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)) &&
+ priv->shadow_type != GTK_SHADOW_NONE)
{
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);