]> Pileus Git - ~andy/gtk/commitdiff
textview: Use gtk_cairo_transform_to_window()
authorBenjamin Otte <otte@redhat.com>
Wed, 22 Sep 2010 14:11:58 +0000 (16:11 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:11:45 +0000 (15:11 +0200)
gtk/gtktextview.c

index 4be2023de984ca6249b536ab67dcd912d82940ae..41b5bc5a7ab4b7ea8e5283ee77592e428edec9f8 100644 (file)
@@ -4853,12 +4853,9 @@ gtk_text_view_draw (GtkWidget *widget,
                                      GTK_TEXT_WINDOW_TEXT);
   if (gtk_cairo_should_draw_window (cr, window))
     {
-      int x, y;
-
       DV(g_print (">Exposed ("G_STRLOC")\n"));
       cairo_save (cr);
-      gdk_window_get_position (window, &x, &y);
-      cairo_translate (cr, x, y);
+      gtk_cairo_transform_to_window (cr, widget, window);
       gtk_text_view_paint (widget, cr);
       cairo_restore (cr);
     }