[gtk+/rendering-cleanup-next: 196/199] menu: Use gtk_cairo_transform_to_window()



commit 641ee96c50ea1cafffdb71e3d5c76bb11639154f
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 23 11:54:27 2010 +0200

    menu: Use gtk_cairo_transform_to_window()

 gtk/gtkmenu.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 705a74a..db5773d 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2969,14 +2969,10 @@ gtk_menu_draw (GtkWidget *widget,
   
   if (gtk_cairo_should_draw_window (cr, menu->bin_window))
     {
-      int xoff, yoff;
       gint y = -border.y + menu->scroll_offset;
       
       cairo_save (cr);
-      gdk_window_get_position (menu->view_window, &xoff, &yoff);
-      cairo_translate (cr, xoff, yoff);
-      gdk_window_get_position (menu->bin_window, &xoff, &yoff);
-      cairo_translate (cr, xoff, yoff);
+      gtk_cairo_transform_to_window (cr, widget, menu->bin_window);
 
       if (!menu->tearoff_active)
         {



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