Strelchun, Timothy wrote:
>> when I change layer's opacity, I hope all content in the 
>> layer (background image or window content) will change 
>> their opacity after calling layer->SetOpacity()
> 
> This is how it should work if the display layer properly 
> supports DLCAPS_OPACITY, and the display layer is configured 
> to use the opacity.
> 
>> Can any one tell what's wrong from following code?
> 
> I believe that with DFB 1.0.1 it's possible to call 
> IDirectFBDisplayLayer::SetOpacity even if it is not supported 
> by the display layer, so make sure to get the description and 
> see if the DLCAPS_OPACITY capability flag is set.
> 
> If it is set, you must then request that the global/constant 
> opacity is used by calling SetConfiguration and specifying 
> the DLOP_OPACITY flag (don't forget to set DLCONF_OPTIONS to 
> indicate there's a valid value in the options field).

Thanks for the explanation :)

I have to add that the calls to SetCooperativeLevel() are the
reason for the black screen. The exclusive level creates another
context with another buffer exclusively for the application. I
fixed the same issue in GdkDirectFB's get_image(?)_from_drawable(?)
or similar which did it wrong for the root window/drawable case.

DLSCL_NORMAL -> shared context, unprivileged
DLSCL_ADMINISTRATIVE -> shared context, privileged
DLSCL_EXCLUSIVE -> separate, exclusive context

So using DLSCL_ADMINISTRATIVE should help. You can also keep using
DLSCL_EXCLUSIVE, but you should set it before creating the first window
and keep it.

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
'------------------------------------------'

_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to