mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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:
parent
8f409578f2
commit
8af6804b71
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user