cleanup/refactor some leftover code.

2007-04-25  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event):
	cleanup/refactor some leftover code.


svn path=/trunk/; revision=17628
This commit is contained in:
Kristian Rietveld 2007-04-25 07:15:49 +00:00 committed by Kristian Rietveld
parent 8f409578f2
commit 8af6804b71
2 changed files with 10 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2007-04-25 Kristian Rietveld <kris@imendio.com>
* gtk/gtktooltip.c (find_topmost_widget_coords_from_event):
cleanup/refactor some leftover code.
2007-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintunixdialog.c (dialog_get_page_ranges): Parse

View File

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