[gtk+/rendering-cleanup-next] textview: Use gtk_widget_get_transform_to_window() to transform
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next] textview: Use gtk_widget_get_transform_to_window() to transform
- Date: Wed, 22 Sep 2010 14:12:56 +0000 (UTC)
commit 2dfc1dafe1fcb26fccc70f20ea24ef6292ef7503
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 22 16:11:58 2010 +0200
textview: Use gtk_widget_get_transform_to_window() to transform
gtk/gtktextview.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 69011a7..c93ea61 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4854,12 +4854,12 @@ gtk_text_view_draw (GtkWidget *widget,
GTK_TEXT_WINDOW_TEXT);
if (gtk_cairo_should_draw_window (cr, window))
{
- int x, y;
+ cairo_matrix_t matrix;
DV(g_print (">Exposed ("G_STRLOC")\n"));
cairo_save (cr);
- gdk_window_get_position (window, &x, &y);
- cairo_translate (cr, x, y);
+ gtk_widget_get_transform_to_window (widget, window, &matrix);
+ cairo_transform (cr, &matrix);
gtk_text_view_paint (widget, cr);
cairo_restore (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]