[gtk+] gdk: remove convert_coords_to_child()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: remove convert_coords_to_child()
- Date: Thu, 15 Apr 2010 11:16:56 +0000 (UTC)
commit 9cac8f23d54aee4814adf5118feeff55c1108c3c
Author: Michael Natterer <mitch gimp org>
Date: Thu Apr 15 13:16:17 2010 +0200
gdk: remove convert_coords_to_child()
and use the new public gdk_window_coords_from_parent().
gdk/gdkwindow.c | 33 +++++++--------------------------
1 files changed, 7 insertions(+), 26 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index c3b6763..e264feb 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9184,25 +9184,6 @@ update_cursor (GdkDisplay *display)
impl_iface->set_cursor ((GdkWindow *)toplevel, cursor_window->cursor);
}
-static void
-convert_coords_to_child (GdkWindowObject *child,
- gdouble x,
- gdouble y,
- gdouble *child_x,
- gdouble *child_y)
-{
- if (gdk_window_is_offscreen (child))
- {
- from_embedder (child, x, y,
- child_x, child_y);
- }
- else
- {
- *child_x = x - child->x;
- *child_y = y - child->y;
- }
-}
-
static gboolean
point_in_window (GdkWindowObject *window,
gdouble x,
@@ -9271,7 +9252,7 @@ convert_toplevel_coords_to_window (GdkWindow *window,
}
for (l = children; l != NULL; l = l->next)
- convert_coords_to_child (l->data, x, y, &x, &y);
+ gdk_window_coords_from_parent (l->data, x, y, &x, &y);
g_list_free (children);
@@ -9315,9 +9296,9 @@ _gdk_window_find_child_at (GdkWindow *window,
if (!GDK_WINDOW_IS_MAPPED (sub))
continue;
- convert_coords_to_child (sub,
- x, y,
- &child_x, &child_y);
+ gdk_window_coords_from_parent ((GdkWindow *)sub,
+ x, y,
+ &child_x, &child_y);
if (point_in_window (sub, child_x, child_y))
return (GdkWindow *)sub;
}
@@ -9361,9 +9342,9 @@ _gdk_window_find_descendant_at (GdkWindow *toplevel,
if (!GDK_WINDOW_IS_MAPPED (sub))
continue;
- convert_coords_to_child (sub,
- x, y,
- &child_x, &child_y);
+ gdk_window_coords_from_parent ((GdkWindow *)sub,
+ x, y,
+ &child_x, &child_y);
if (point_in_window (sub, child_x, child_y))
{
x = child_x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]