On Sat, 2008-02-09 at 15:36 +0100, Johan Bilien wrote: > > ... yes again. it's not possible to subclass the stage, as it is a > > singleton and the actual implementation very much backend-dependent. > > it's like trying to subclass a GdkWindow - even though it might change > > in the future (especially with multiple stages support). > > Couldn't stage_init store a static pointer to the first instance of any > of its subclasses, which would become the default stage?
I'm afraid I don't understand what would you accomplish with that. internally, Clutter does exactly that - but it's all decided at compile time which type is going to be used. as I said, this might change in the future, as we allow multiple stages; but right now it's not possible to change the compile-time nature of the stage and backend. > > also, setting a foreign window for the stage must call > > clutter_actor_realize() on the stage to recreate the GL context, so > > reparenting inside an overridden realize will not work even if it were > > possible. > > Will it not then reparent the foreign window, which would be the > expected behavior I think? yes, but in any case you don't need to use reparent-on-realize; just set the foreign window as soon as you get the default stage and reparent on the ::show signal: stage = clutter_stage_get_default(); /* the stage has already been realized at this point */ g_signal_connect (stage, "show", G_CALLBACK (reparent_on_show), NULL); and inside reparent_on_show you can reparent the window. ciao, Emmanuele. -- Emmanuele Bassi, OpenedHand Ltd. Unit R, Homesdale Business Centre 216-218 Homesdale Rd., Bromley - BR12QZ http://www.o-hand.com -- To unsubscribe send a mail to [EMAIL PROTECTED]
