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; }