Mercurial > audlegacy-plugins
diff src/aosd/aosd_osd.c @ 908:8b4b381b4399 trunk
[svn] aosd: added compile option in configure for composite support; this way, if support is compiled in, we can safely check if the composite module is loaded
author | giacomo |
---|---|
date | Mon, 02 Apr 2007 04:03:06 -0700 |
parents | f20ca9b8cd7d |
children | 0010163f8e25 |
line wrap: on
line diff
--- a/src/aosd/aosd_osd.c Sun Apr 01 11:36:52 2007 -0700 +++ b/src/aosd/aosd_osd.c Mon Apr 02 04:03:06 2007 -0700 @@ -444,7 +444,20 @@ if ( transparency_mode == AOSD_MISC_TRANSPARENCY_FAKE ) osd = ghosd_new(); else - osd = ghosd_new_with_argbvisual(); +#ifdef HAVE_XCOMPOSITE + { + /* check if the composite module is actually loaded */ + if ( aosd_osd_check_composite() ) + osd = ghosd_new_with_argbvisual(); /* ok */ + else + { + g_warning( "X Composite module not loaded; falling back to fake transparency.\n"); + osd = ghosd_new(); /* fall back to fake transparency */ + } + } +#else + osd = ghosd_new(); +#endif if ( osd == NULL ) g_warning( "Unable to load osd object; OSD will not work properly!\n" ); @@ -464,3 +477,11 @@ } return; } + +#ifdef HAVE_XCOMPOSITE +int +aosd_osd_check_composite ( void ) +{ + return ghosd_check_composite(); +} +#endif