[gtk+/rendering-cleanup-next] textview: Get rid of gdk_drawable_get_size() usage
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next] textview: Get rid of gdk_drawable_get_size() usage
- Date: Mon, 20 Sep 2010 15:34:13 +0000 (UTC)
commit b3e4e0365f06c6e162aebd43ce05522ea301f762
Author: Benjamin Otte <otte redhat com>
Date: Mon Sep 20 16:44:19 2010 +0200
textview: Get rid of gdk_drawable_get_size() usage
gtk/gtktextview.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index d76edbf..205e870 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -6293,21 +6293,20 @@ drag_scan_timeout (gpointer data)
GtkTextView *text_view;
GtkTextViewPrivate *priv;
GtkTextIter newplace;
- gint x, y, width, height;
+ gint x, y;
gdouble pointer_xoffset, pointer_yoffset;
text_view = GTK_TEXT_VIEW (data);
priv = text_view->priv;
get_iter_at_pointer (text_view, priv->dnd_device, &newplace, &x, &y);
- gdk_drawable_get_size (priv->text_window->bin_window, &width, &height);
gtk_text_buffer_move_mark (get_buffer (text_view),
priv->dnd_mark,
&newplace);
- pointer_xoffset = (gdouble) x / width;
- pointer_yoffset = (gdouble) y / height;
+ pointer_xoffset = (gdouble) x / gdk_window_get_width (priv->text_window->bin_window);
+ pointer_yoffset = (gdouble) y / gdk_window_get_height (priv->text_window->bin_window);
if (check_scroll (pointer_xoffset, priv->hadjustment) ||
check_scroll (pointer_yoffset, priv->vadjustment))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]