[gtk+/rendering-cleanup-next: 59/199] notebook: Reorder expose function in preparation of draw vfunc
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 59/199] notebook: Reorder expose function in preparation of draw vfunc
- Date: Thu, 23 Sep 2010 21:24:03 +0000 (UTC)
commit ce1b99c1dc5fb0d5095b0cbec3a4e50573e530ed
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 0ff6938..3412a29 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2255,32 +2255,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, >k_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)
@@ -2315,6 +2290,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, >k_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]