]> Pileus Git - ~andy/gtk/commitdiff
Set drag window background to be the GtkNotebook background color. This is
authorCarlos Garnacho <carlos@imendio.com>
Mon, 4 Aug 2008 14:46:22 +0000 (14:46 +0000)
committerCarlos Garnacho <carlosg@src.gnome.org>
Mon, 4 Aug 2008 14:46:22 +0000 (14:46 +0000)
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

ChangeLog
gtk/gtknotebook.c

index fd2e7c943fbac9a5caed622cca9420088759072d..2c7df422bf3c474ce49b2cde129fd038981577fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
 2008-08-04  Carlos Garnacho  <carlos@imendio.com>
 
        * gtk/gtk.symbols:
index b623e15ea31821fffe8f2018359806ee2b6fa7b3..c65df4372decd6b33ea8d60c79c9efd15e124dfe 100644 (file)
@@ -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);