diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-08-16 00:37:35 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-08-22 18:28:12 +0200 |
commit | 8c4783da059002e22bd97e3b4e60d3760a3a9d01 (patch) | |
tree | c4d8e74c4b6a46bf2dadade0870f9d49aec86d0f /demos/gtk-demo/hypertext.c | |
parent | e80db673b1d2416eb2fecda92c6193c8d317fba5 (diff) | |
download | gtk+-8c4783da059002e22bd97e3b4e60d3760a3a9d01.tar.gz |
demos/gtk-demo/hypertext.c: Use accessor functions to access GtkWidget
Diffstat (limited to 'demos/gtk-demo/hypertext.c')
-rw-r--r-- | demos/gtk-demo/hypertext.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c index 8b67c05a3a..91eec36a1b 100644 --- a/demos/gtk-demo/hypertext.c +++ b/demos/gtk-demo/hypertext.c @@ -225,7 +225,8 @@ motion_notify_event (GtkWidget *text_view, set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y); - gdk_window_get_pointer (text_view->window, NULL, NULL, NULL); + gdk_window_get_pointer (gtk_widget_get_window (text_view), + NULL, NULL, NULL); return FALSE; } @@ -237,9 +238,10 @@ visibility_notify_event (GtkWidget *text_view, GdkEventVisibility *event) { gint wx, wy, bx, by; - - gdk_window_get_pointer (text_view->window, &wx, &wy, NULL); - + + gdk_window_get_pointer (gtk_widget_get_window (text_view), + &wx, &wy, NULL); + gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view), GTK_TEXT_WINDOW_WIDGET, wx, wy, &bx, &by); |