Mercurial > audlegacy-plugins
comparison 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 |
comparison
equal
deleted
inserted
replaced
907:f20ca9b8cd7d | 908:8b4b381b4399 |
---|---|
442 { | 442 { |
443 /* create Ghosd object */ | 443 /* create Ghosd object */ |
444 if ( transparency_mode == AOSD_MISC_TRANSPARENCY_FAKE ) | 444 if ( transparency_mode == AOSD_MISC_TRANSPARENCY_FAKE ) |
445 osd = ghosd_new(); | 445 osd = ghosd_new(); |
446 else | 446 else |
447 osd = ghosd_new_with_argbvisual(); | 447 #ifdef HAVE_XCOMPOSITE |
448 { | |
449 /* check if the composite module is actually loaded */ | |
450 if ( aosd_osd_check_composite() ) | |
451 osd = ghosd_new_with_argbvisual(); /* ok */ | |
452 else | |
453 { | |
454 g_warning( "X Composite module not loaded; falling back to fake transparency.\n"); | |
455 osd = ghosd_new(); /* fall back to fake transparency */ | |
456 } | |
457 } | |
458 #else | |
459 osd = ghosd_new(); | |
460 #endif | |
448 | 461 |
449 if ( osd == NULL ) | 462 if ( osd == NULL ) |
450 g_warning( "Unable to load osd object; OSD will not work properly!\n" ); | 463 g_warning( "Unable to load osd object; OSD will not work properly!\n" ); |
451 } | 464 } |
452 return; | 465 return; |
462 ghosd_destroy( osd ); | 475 ghosd_destroy( osd ); |
463 osd = NULL; | 476 osd = NULL; |
464 } | 477 } |
465 return; | 478 return; |
466 } | 479 } |
480 | |
481 #ifdef HAVE_XCOMPOSITE | |
482 int | |
483 aosd_osd_check_composite ( void ) | |
484 { | |
485 return ghosd_check_composite(); | |
486 } | |
487 #endif |