/* gcc -Wall `pkg-config --libs --cflags gtk+-2.0` test.c && ./a.out */

#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>


#include <errno.h>
#include <stdlib.h>

gboolean
present_win(GtkWidget *parent)
{
   gtk_window_present (GTK_WINDOW (parent));

   return TRUE;
}

int
main (int argc, char *argv[])
{
   GtkWidget * window, *button;

   gtk_init( &argc, &argv );
   
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   button = gtk_button_new_with_label( "I'm just a button\nI don't do anything" );
   gtk_widget_show (button);
   gtk_container_add(GTK_CONTAINER (window), button);

   g_signal_connect_swapped (window, "destroy", gtk_main_quit, NULL);

   g_timeout_add (2000,  (GSourceFunc)present_win, window);
   
   gtk_widget_show_now (window);

   gtk_main();

   return 0;
}
