This avoids a few milliseconds of black which some users have reported.
g_main_loop_unref (loop);
g_main_context_unref (context);
g_main_loop_unref (loop);
g_main_context_unref (context);
g_timeout_add (500, destroy_splash_window, win);
g_timeout_add (500, destroy_splash_window, win);
gtk_main ();
/* Not much point in this except to check for memory leaks */
gtk_main ();
/* Not much point in this except to check for memory leaks */
splash_prepare (GSource *source,
gint *timeout_)
{
splash_prepare (GSource *source,
gint *timeout_)
{
+ GdkEvent *e = gdk_event_peek ();
+ if (!e)
+ return FALSE;
+
+ gdk_event_free (e);
return TRUE;
}
gboolean
splash_check (GSource *source)
{
return TRUE;
}
gboolean
splash_check (GSource *source)
{
+ GdkEvent *e = gdk_event_peek ();
+ if (!e)
+ return FALSE;
+
+ gdk_event_free (e);
gboolean
splash_dispatch (GSource *ss,
GSourceFunc callback,
gpointer user_data)
{
struct splash_source *source = (struct splash_source *) ss;
gboolean
splash_dispatch (GSource *ss,
GSourceFunc callback,
gpointer user_data)
{
struct splash_source *source = (struct splash_source *) ss;
GdkEvent *e = gdk_event_get ();
if (!e)
GdkEvent *e = gdk_event_get ();
if (!e)
GdkWindow *w = ((GdkEventAny *)e)->window;
GdkWindow *w = ((GdkEventAny *)e)->window;
}
fill_splash_window (w, source->sfc);
}
fill_splash_window (w, source->sfc);
+ gdk_display_flush (gdk_window_get_display (w));
gdk_event_free (e);
return TRUE;
gdk_event_free (e);
return TRUE;