[gtk+/rendering-cleanup-next: 59/203] notebook: Reorder expose function in preparation of draw vfunc



commit 7cb179c6d4aa2f55f6b0984fcfc0206c89e67338
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 6 23:18:14 2010 +0200

    notebook: Reorder expose function in preparation of draw vfunc

 gtk/gtknotebook.c |   53 +++++++++++++++++++++++++++--------------------------
 1 files changed, 27 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 6adf5b9..7255b74 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2257,32 +2257,7 @@ gtk_notebook_expose (GtkWidget      *widget,
   GtkNotebookPrivate *priv = notebook->priv;
   gint i;
 
-  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, &gtk_widget_get_style(widget)->bg [GTK_STATE_NORMAL]);
-      cairo_paint (cr);
-      cairo_destroy (cr);
-
-      gdk_drawable_get_size (priv->drag_window,
-			     &area.width, &area.height);
-      gtk_notebook_draw_tab (notebook,
-			     priv->cur_page,
-			     &area);
-      gtk_container_propagate_expose (GTK_CONTAINER (notebook),
-				      priv->cur_page->tab_label, event);
-    }
-  else if (gtk_widget_is_drawable (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_notebook_paint (widget, &event->area);
       if (priv->show_tabs)
@@ -2317,6 +2292,32 @@ 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, &gtk_widget_get_style (widget)->bg [GTK_STATE_NORMAL]);
+      cairo_paint (cr);
+      cairo_destroy (cr);
+
+      gdk_drawable_get_size (priv->drag_window,
+			     &area.width, &area.height);
+      gtk_notebook_draw_tab (notebook,
+			     priv->cur_page,
+			     &area);
+      gtk_container_propagate_expose (GTK_CONTAINER (notebook),
+				      priv->cur_page->tab_label, event);
+    }
+  
   return FALSE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]