[gtk+/rendering-cleanup-next: 56/154] notebook: Remove useless optimization



commit 144d88c8817ea65586934d88952022684662f23e
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 6 23:07:52 2010 +0200

    notebook: Remove useless optimization
    
    It will become especially useless once we draw with Cairo exclusively.

 gtk/gtknotebook.c |   30 +++++++++++++-----------------
 1 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 899d8b3..328fdf1 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4974,7 +4974,6 @@ gtk_notebook_draw_tab (GtkNotebook     *notebook,
 		       GdkRectangle    *area)
 {
   GtkNotebookPrivate *priv;
-  GdkRectangle child_area;
   GdkRectangle page_area;
   GtkStateType state_type;
   GtkPositionType gap_side;
@@ -4999,22 +4998,19 @@ gtk_notebook_draw_tab (GtkNotebook     *notebook,
   page_area.width = page->allocation.width;
   page_area.height = page->allocation.height;
 
-  if (gdk_rectangle_intersect (&page_area, area, &child_area))
-    {
-      gap_side = get_tab_gap_pos (notebook);
-
-      if (priv->cur_page == page)
-	state_type = GTK_STATE_NORMAL;
-      else 
-	state_type = GTK_STATE_ACTIVE;
+  gap_side = get_tab_gap_pos (notebook);
 
-      gtk_paint_extension (gtk_widget_get_style (widget), window,
-			   state_type, GTK_SHADOW_OUT,
-			   area, widget, "tab",
-			   page_area.x, page_area.y,
-			   page_area.width, page_area.height,
-			   gap_side);
-    }
+  if (priv->cur_page == page)
+    state_type = GTK_STATE_NORMAL;
+  else 
+    state_type = GTK_STATE_ACTIVE;
+
+  gtk_paint_extension (gtk_widget_get_style (widget), window,
+                       state_type, GTK_SHADOW_OUT,
+                       area, widget, "tab",
+                       page_area.x, page_area.y,
+                       page_area.width, page_area.height,
+                       gap_side);
 }
 
 static void



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