[gtk+/rendering-cleanup-next: 194/199] entry: Use gtk_cairo_transform_to_window()



commit e78042ac703ddefb8383422bf8aec9d3bae0a72e
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 23 11:54:06 2010 +0200

    entry: Use gtk_cairo_transform_to_window()

 gtk/gtkentry.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 6214dee..9f96983 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3465,12 +3465,9 @@ gtk_entry_draw (GtkWidget *widget,
 
   if (gtk_cairo_should_draw_window (cr, entry->text_area))
     {
-      gint x, y;
-
       cairo_save (cr);
 
-      gdk_window_get_position (entry->text_area, &x, &y);
-      cairo_translate (cr, x, y);
+      gtk_cairo_transform_to_window (cr, widget, entry->text_area);
 
       gtk_paint_flat_box (style, cr,
 			  state, GTK_SHADOW_NONE,
@@ -3501,12 +3498,9 @@ gtk_entry_draw (GtkWidget *widget,
 
       if (icon_info != NULL && gtk_cairo_should_draw_window (cr, icon_info->window))
         {
-          gint x, y;
-
           cairo_save (cr);
 
-          gdk_window_get_position (icon_info->window, &x, &y);
-          cairo_translate (cr, x, y);
+          gtk_cairo_transform_to_window (cr, widget, icon_info->window);
 
           gtk_paint_flat_box (style, cr,
                               state, GTK_SHADOW_NONE,



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