[gtk+/rendering-cleanup-next: 198/203] entry: Use gtk_cairo_transform_to_window()



commit 4b8f0720240ac74759460dd6649924bed0b19cb5
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 e69dc56..c0db92f 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3471,12 +3471,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,
@@ -3507,12 +3504,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]