[anjuta-list] Embedding a clutter widget into a dockItem



Morning,

Having an issue with using a ClutterEmbed widget inside an anjuta plugin.

I am creating a graphical widget plugin for gtkpod, using Clutter as the
toolkit. In case anyone is not aware, I am building gtkpod using the
libanjuta framework, ie. all UI elements come from plugins etc...

The widget works fine and I can display a nice black background inside a
docked window. The problem comes when I iconify or hide the dockItem.

Effectively, hiding the dockitem crashes the entire application with a
BadWindow X Window System error:

The program
'/home/phantomjinx/programming/cpp/gtkpod/src/.libs/lt-gtkpod' received
an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
   (Details: serial 8414 error_code 3 request_code 10 minor_code 0)
   (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error()
function.)

The various methods of hiding the dockitem all use
void gdl_dock_item_hide_item (GdlDockItem *item)

which in turn calls
gdl_dock_object_detach (GDL_DOCK_OBJECT (item), TRUE);

I have found that hiding any dockItem in the application causes the crash.
So it points to maybe something in the layouts since this (below) gets
called from the only "detach" signal callback.

g_idle_add (idle_emit_layout_changed, master);

Interestingly, making the ClutterEmbed widget not visible before hiding
the dockItem avoids the crash. Difficulty is trying to construct a
callback that hides the widget before the dockItem is hidden. This would
remain a workaround.

Incidentally, I cannot get to the exact gdk_x_error above even with the
--sync argument and gdb.

I have posted to the clutter-devel mailing list as well to see if they
have any ideas from the clutter side but if anyone has anything on the gdl
side then I would be most appreciative.

Thanks

PGR (a.k.a. phantomjinx)

-- 
Laws are partly formed for the sake of good men, in order to instruct them
how they may live on friendly terms with one another, and partly for the
sake of those who refuse to be instructed, whose spirit cannot be subdued,
or softened, or hindered from plunging into evil. [The Laws, Plato]

You fiend! Never have I encountered such corrupt and foul-minded
perversity? Have you ever considered a career in the church?
Bishop of Bath and Wells (Blackadder II)

A clear conscience? When did you acquire such luxuries, Bernard? (Sir
Humphrey, Yes Prime Minister)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]