#include <gtk/gtk.h>

GtkWidget *window;
gboolean shown;

gboolean hide_window (gpointer data)
{
	if (shown) {
		g_print ("Hiding\n");
		gtk_widget_hide (window);
		shown = FALSE;
	} else {
		g_print ("Showing\n");
		gtk_widget_show (window);
		shown = TRUE;
	}

	return TRUE;
}	

int main (int argc, char **argv)
{
	GtkWidget *label;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);	
	gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
	gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG);
	label = gtk_label_new ("Test");
	gtk_container_add (GTK_CONTAINER (window), label);

	gtk_widget_show_all (window);

	shown = TRUE;

	g_timeout_add (5000, hide_window, NULL);

	gtk_main ();
}
