diff -r a59acc683080 -r 6c78cc6bd7a6 Source/GGBLayer.m --- a/Source/GGBLayer.m Thu May 29 15:04:06 2008 -0700 +++ b/Source/GGBLayer.m Thu Jul 03 17:44:30 2008 -0700 @@ -288,3 +288,12 @@ } +CGColorRef GetEffectiveBackground( CALayer *layer ) +{ + for( ; layer; layer=layer.superlayer ) { + CGColorRef bg = layer.backgroundColor; + if( bg ) + return bg; + } + return nil; +}