From 8af6804b7114cbf0c14bbe8af4f2b409e08fe521 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Wed, 25 Apr 2007 07:15:49 +0000 Subject: [PATCH] cleanup/refactor some leftover code. 2007-04-25 Kristian Rietveld * gtk/gtktooltip.c (find_topmost_widget_coords_from_event): cleanup/refactor some leftover code. svn path=/trunk/; revision=17628 --- ChangeLog | 5 +++++ gtk/gtktooltip.c | 19 +++++-------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0ba2bc189..47bb06cde2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-04-25 Kristian Rietveld + + * gtk/gtktooltip.c (find_topmost_widget_coords_from_event): + cleanup/refactor some leftover code. + 2007-04-24 Matthias Clasen * gtk/gtkprintunixdialog.c (dialog_get_page_ranges): Parse diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 2a4228963b..47a1b207ec 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -497,26 +497,17 @@ find_topmost_widget_coords_from_event (GdkEvent *event, gint tx, ty; gdouble dx, dy; GtkWidget *tmp; - GtkWidget *orig; gdk_event_get_coords (event, &dx, &dy); tx = dx; ty = dy; - orig = tmp = find_widget_under_pointer (event->any.window, &tx, &ty); + tmp = find_widget_under_pointer (event->any.window, &tx, &ty); - if (tmp && (x != NULL || y != NULL)) - { - if (tmp != orig) - gtk_widget_translate_coordinates (orig, tmp, tx, ty, x, y); - else - { - if (x) - *x = tx; - if (y) - *y = ty; - } - } + if (x) + *x = tx; + if (y) + *y = ty; return tmp; }