This is an utterly horrible idea, but you can override the "focus-out-event" handler for your window and have it call gtk_window_present
.
Something like gksu does:
static gboolean
focus_out_cb (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
gtk_window_present (GTK_WINDOW(widget));
return TRUE;
}
//in your initialization code for your window...
/* make sure that our window will always have the focus */
g_signal_connect (G_OBJECT(mywindow), "focus-out-event",
G_CALLBACK(focus_out_cb), NULL);
This hopefully has the added benefit of if your application does freeze, the signal for focus-out-event will probably not be handled. I'm not sure how GTK does UI threading though, but I think this should be true.