Use the gtk_widget_translate_coordinates() function to map the coordinates of the coordinates of the child widget to the coordinates of the top level containing the widget. It might look something like this:
GtkWidget *somewidget; gint wx, wy; gtk_widget_translate_coordinates(somewidget, gtk_widget_get_toplevel(somewidget), 0, 0, &wx, &wy);
Please note that in many cases, forcing the position of a new window is unreliable if it does not act as a pop-up menu.
Geoff reedy
source share