On Mon, Mar 24, 2003 at 12:14:34AM +0100, Sven Neumann wrote:
> Hi,

Hey Sven,

> you are using the HEAD branch which is based on gtk+-2.2.

Doh!  This should have occurred to me.

> Please use
> the gtk-2-0 branch of gdk-directfb.

Done.  Got the same problem that led to rebuilding all this in the
first place.  I hacked up gtk+-directfb's _gdk_windowing_init_check to
use layer 2 instead of DLID_PRIMARY (Matrox CRTC2) and then set the
pixel format to RGB32 with the following code:

#if 0
  ret = DirectFB->GetDisplayLayer (DirectFB, DLID_PRIMARY, &DisplayLayer);
#else
  ret = DirectFB->GetDisplayLayer (DirectFB, 2, &DisplayLayer);
  if (ret == DFB_OK) {

    DFBDisplayLayerConfig dlc;
    DFBResult ret2;

    dlc.flags = DLCONF_PIXELFORMAT;
    dlc.pixelformat = DSPF_RGB32;
    g_warning ("setting pixelformat to %x", dlc.pixelformat);
    ret2 = DisplayLayer->SetConfiguration (DisplayLayer, &dlc);
    if (ret2 != DFB_OK)
      DirectFBError ("gdk_windowing_init_check: SetConfiguration", ret2);
  }
#endif

but when the code runs I am getting:

(*) DirectFB/Layer: Enabled 'FBDev Primary Layer'.
(*) DirectFB/Layer: Enabled 'Matrox CRTC2'.

(chooser2:25340): Gdk-DirectFB-WARNING **: setting pixelformat to 401804
(#) DirectFBError [gdk_windowing_init_check: SetConfiguration]: Access denied!

Not sure what "Access denied" means in the context of SetConfiguration
however.

> The HEAD branch compiles (with
> gtk+-2.2) but does not work yet.

Can't wait until it does so I don't have to hack it to use the CRTC2
layer.  :-)

OT: You know what would be really nice, but certainly outside the
    scope of (gtk+-)DirectFB, is runtime binding to the GDK library.
    If all gtk/gdk apps were linked to a generic libgdk which then
    (based on some criteria at runtime) decided which libgdk backend
    to use (X11, DirectFB, etc.) one would not have to keep the same
    app linked differently for each graphics paradigm one wanted to
    run it on.

b.

-- 
Brian J. Murrell

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to