~cairo-dock-team/cairo-dock-core/cairo-dock

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-container.c

  • Committer: Matthieu Baerts
  • Date: 2014-03-24 22:06:32 UTC
  • Revision ID: matttbe@gmail.com-20140324220632-rxpty4iyokdyp7eu
Container: init: if there is a dialogue at startup, wait a bit more before checking if the screen supports the compositing

It avoids a possible crash and wrong check (g_bUseOpenGL && ! g_openglConfig.bAlphaAvailable)
Maybe it's better to add a 'reload' function to launch the timeout only after having closed the GTK dialogue but... it's only to prevent a possible crash when we launch the dock for the first time :-)

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
}
469
469
static gboolean _check_composite_delayed (G_GNUC_UNUSED gpointer data)
470
470
{
 
471
        // if there is a dialogue at startup, there is no main dock, wait a bit more.
 
472
        if (g_pMainDock == NULL)
 
473
                return TRUE;
 
474
 
471
475
        GdkScreen *pScreen = gdk_screen_get_default ();
472
476
        if (!gdk_screen_is_composited (pScreen) || (g_bUseOpenGL && ! g_openglConfig.bAlphaAvailable))  // no composite available -> load the desktop background
473
477
        {