[gtk+/rendering-cleanup-next: 201/203] notebook: Use gtk_cairo_transform_to_window()



commit 9c08be7fed26b5b0040176ca148ede13522d14ae
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 23 11:54:34 2010 +0200

    notebook: Use gtk_cairo_transform_to_window()

 gtk/gtknotebook.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 1e92745..756c9d0 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2304,7 +2304,8 @@ gtk_notebook_draw (GtkWidget *widget,
   if (priv->operation == DRAG_OPERATION_REORDER &&
       gtk_cairo_should_draw_window (cr, priv->drag_window))
     {
-      int x, y;
+      cairo_save (cr);
+      gtk_cairo_transform_to_window (cr, widget, priv->drag_window);
 
       /* FIXME: This is a workaround to make tabs reordering work better
        * with engines with rounded tabs. If the drag window background
@@ -2313,10 +2314,6 @@ gtk_notebook_draw (GtkWidget *widget,
        * Ideally, these corners should be made transparent, Either by using
        * ARGB visuals or shape windows.
        */
-      cairo_save (cr);
-      gdk_window_get_position (priv->drag_window, &x, &y);
-      cairo_translate (cr, x - allocation.x, y - allocation.y);
-
       gdk_cairo_set_source_color (cr, &gtk_widget_get_style (widget)->bg [GTK_STATE_NORMAL]);
       cairo_paint (cr);
 



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