diff options
author | Carlos Garnacho <carlos@imendio.com> | 2008-08-04 14:46:22 +0000 |
---|---|---|
committer | Carlos Garnacho <carlosg@src.gnome.org> | 2008-08-04 14:46:22 +0000 |
commit | e9be9eb19076987e053816f6d11eb5e1c7da58ed (patch) | |
tree | d65cdb64bfd1f5b0f15eb3367d8c3a9199ab8659 /gtk/gtknotebook.c | |
parent | 7e439efc922b9566bd44a6061c5615c30ebb1916 (diff) | |
download | gtk+-e9be9eb19076987e053816f6d11eb5e1c7da58ed.tar.gz |
Set drag window background to be the GtkNotebook background color. This is
2008-08-04 Carlos Garnacho <carlos@imendio.com>
* gtk/gtknotebook.c (gtk_notebook_expose): Set drag window background
to be the GtkNotebook background color. This is a workaround to
prevent black pixels in rounded tabs when reordering. Improves
#368234.
svn path=/trunk/; revision=20973
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index b623e15ea3..c65df4372d 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -2147,6 +2147,19 @@ gtk_notebook_expose (GtkWidget *widget, if (event->window == priv->drag_window) { GdkRectangle area = { 0, }; + cairo_t *cr; + + /* FIXME: This is a workaround to make tabs reordering work better + * with engines with rounded tabs. If the drag window background + * isn't set, the rounded corners would be black. + * + * Ideally, these corners should be made transparent, Either by using + * ARGB visuals or shape windows. + */ + cr = gdk_cairo_create (priv->drag_window); + gdk_cairo_set_source_color (cr, &widget->style->bg [GTK_STATE_NORMAL]); + cairo_paint (cr); + cairo_destroy (cr); gdk_drawable_get_size (priv->drag_window, &area.width, &area.height); |