[epiphany] Remove some deprecated GTK+ calls
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Remove some deprecated GTK+ calls
- Date: Mon, 21 Nov 2011 19:29:21 +0000 (UTC)
commit 1ea903e6e4f0079501486409b16887edfc8fd0b0
Author: Claudio Saavedra <csaavedra igalia com>
Date: Mon Nov 21 19:31:51 2011 +0100
Remove some deprecated GTK+ calls
https://bugzilla.gnome.org/show_bug.cgi?id=664120
lib/widgets/ephy-node-view.c | 10 +++++++---
lib/widgets/ephy-overlay-escaping-child.c | 4 +++-
src/ephy-notebook.c | 11 +++++++----
3 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index e30a536..abd1f0f 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -191,9 +191,13 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
window = gtk_tree_view_get_bin_window (tree_view);
vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (tree_view));
-
- gdk_window_get_pointer (window, NULL, &y, NULL);
-
+
+ gdk_window_get_device_position (window,
+ gdk_device_manager_get_client_pointer (
+ gdk_display_get_device_manager (
+ gtk_widget_get_display (GTK_WIDGET (tree_view)))),
+ NULL, &y, NULL);
+
y += gtk_adjustment_get_value (vadjustment);
gtk_tree_view_get_visible_rect (tree_view, &visible_rect);
diff --git a/lib/widgets/ephy-overlay-escaping-child.c b/lib/widgets/ephy-overlay-escaping-child.c
index c321d92..b1fd796 100644
--- a/lib/widgets/ephy-overlay-escaping-child.c
+++ b/lib/widgets/ephy-overlay-escaping-child.c
@@ -82,7 +82,9 @@ parent_motion_notify_event (GtkWidget *widget,
gtk_widget_get_allocation (widget, &alloc);
if (is_point_in_rectangle (event->x, event->y, priv->escaping_area)) {
- gtk_widget_get_pointer (widget, &distance_x, &distance_y);
+ gdk_window_get_device_position (gtk_widget_get_window (widget),
+ gdk_event_get_device ((GdkEvent *) event),
+ &distance_x, &distance_y, NULL);
alloc.y += priv->escaping_distance + distance_y;
}
else {
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index d5cc413..756a29d 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -189,14 +189,16 @@ ephy_notebook_class_init (EphyNotebookClass *klass)
/* FIXME remove when gtknotebook's func for this becomes public, bug #.... */
static EphyNotebook *
-find_notebook_at_pointer (gint abs_x, gint abs_y)
+find_notebook_at_pointer (GdkDisplay *display, gint abs_x, gint abs_y)
{
GdkWindow *win_at_pointer, *toplevel_win;
gpointer toplevel = NULL;
gint x, y;
- /* FIXME multi-head */
- win_at_pointer = gdk_window_at_pointer (&x, &y);
+ win_at_pointer = gdk_device_get_window_at_position (
+ gdk_device_manager_get_client_pointer (
+ gdk_display_get_device_manager (display)),
+ &x, &y);
if (win_at_pointer == NULL)
{
/* We are outside all windows containing a notebook */
@@ -224,7 +226,8 @@ is_in_notebook_window (EphyNotebook *notebook,
{
EphyNotebook *nb_at_pointer;
- nb_at_pointer = find_notebook_at_pointer (abs_x, abs_y);
+ nb_at_pointer = find_notebook_at_pointer (gtk_widget_get_display (GTK_WIDGET (notebook)),
+ abs_x, abs_y);
return nb_at_pointer == notebook;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]