#include <gtk/gtk.h>

static gboolean
on_idle (GtkWindow *window)
{
	gint x, y;

	gtk_window_get_position (window, &x, &y);

	return FALSE;
}

int main()
{
	GtkWidget *window;
	GtkWidget *button;

	gtk_init (NULL, NULL);

	window = gtk_offscreen_window_new ();
	button = gtk_button_new_with_label ("Lala");
	gtk_container_add (GTK_CONTAINER (window), button);
	gtk_widget_show_all (window);

	g_idle_add ((GSourceFunc)on_idle, window);

	gtk_main ();

	return 0;
}
