Commit 8af6804b authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

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
parent 8f409578
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
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment