Hi Amit,

I also faced similar issue when i was working with eglx backend but for
some other platform. I believe not many people are working on eglx
backend, that's why i never got any response either here or in IRC.

The problem is clutter-x11 backend. Go inside
clutter_x11_get_stage_visual(). It returns CLUTTER_STAGE_X11
(impl)->xvisinfo, which is NULL here. I don't know whether it should be
set here by someone else or not. So, i took a look at the glx backend,
and found that there this is created using glXChooseVisual() in
clutter_stage_glx_realize().

So, i tried creating the visinfo by myself in clutter-x11 and it seems
to be working. But truly, i don't know whether it is the real fix.

My fix is as follows...  the whole if block in brown color is my change.

XVisualInfo *
clutter_x11_get_stage_visual (ClutterStage *stage)
{
  ClutterStageWindow *impl;
  ClutterStageX11 *stage_x11;
        XVisualInfo theTemplate;
  XVisualInfo *xvinfo;
  int numVisuals;
  long mask;

  g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);

  impl = _clutter_stage_get_window (stage);
  g_assert (CLUTTER_IS_STAGE_X11 (impl));

//      return CLUTTER_STAGE_X11 (impl)->xvisinfo;
#if 1
        if((CLUTTER_STAGE_X11 (impl)->xvisinfo)==NULL)
        {
          stage_x11 = CLUTTER_STAGE_X11 (impl);
                theTemplate.screen = DefaultScreen (stage_x11->xdpy);
                mask = VisualScreenMask;
                xvinfo = XGetVisualInfo(stage_x11->xdpy, mask, &theTemplate,
&numVisuals);
                stage_x11->xvisinfo=xvinfo;
                return xvinfo;
                
        }
        else
                return CLUTTER_STAGE_X11 (impl)->xvisinfo;
#endif
}

Regs,
Rahaman


-----Original Message-----
From: Amit Pundir <[email protected]>
To: [email protected]
Subject: [clutter] Re: Confused by eglx backend
Date: Tue, 27 Jan 2009 14:32:37 +0530


gtk-clutter(0.8.2) as well as latest (0.9.0) with "eglx flavour"
doesn't seem to be working for me.

It catches a SEG Fault at gtk_clutter_embed_init(), where
clutter_x11_get_stage_visual() returns NULL:

....
xvinfo = clutter_x11_get_stage_visual (CLUTTER_STAGE (priv->stage));
visual = gdk_x11_screen_lookup_visual (gdk_screen_get_default (),
                                           xvinfo->visualid);
.....

gtk-clutter embedded stage works well for "glx flavour" though.

Is it a known issue?
What could possibly be the problem here?

Regards
Amit Pundir

On Wed, Jan 21, 2009 at 12:53 PM, Gregoire Gentil <[email protected]> wrote:
> Amit,
>
> I'm with clutter-0.8.4+svnr3597 and "--with-flavour=eglx
> --with-gles=2.0" and I don't have such problem. Have you tried 8.4 with
> eglx?
>
> Grégoire
>
>

Reply via email to