GtkPlug / GtkSocket ...
- From: Michael Meeks <michael ximian com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel <gtk-devel-list gnome org>
- Subject: GtkPlug / GtkSocket ...
- Date: Wed, 31 Oct 2001 02:58:55 -0500 (EST)
Hi Owen,
Oh dear, by the time I start using this it's nearly frozen and
I have to start doing evil things (again) :-) Anyway - a wibni and a
bug.
My wibni for the plug / socket ( and I can work around this,
by overriding every one of the GtkWidget methods (again) in
BonoboSocket and conditionaly forwarding them ). Anyway - my wish is
this.
Currently if we have an in-proc control, then although the
CORBA layer knows about this well in advance of the GtkSocket getting
realized, the GtkSocket / GtkPlug have to wait until they are realized
to do even the most basic size negotiation (eg).
Thus; even if a widget is in-proc, it resizes inelegantly
after a the realize at some stage. This is because the plug / socket
rely on the X resources in several places. However - once the socket /
plug have detected that they are in-proc, they avoid doing obscure X
traffic and just forward events to each other in every case.
So my request is this: can I have a clean way of constructing
a GtkPlug and pass it a GtkSocket window ? this would amount in some
sense to exposing _gtk_plug_add_to_socket in some form, and perhaps
being a bit more careful to ensure that the socket_window resources
arn't needed / are setup on realize if neccessary.
Currently I have some evil hacks - libbonoboui/bonobo/
bonobo-control-frame.c (bonobo_control_frame_set_inproc_widget) which
do evil things inside the plug / socket to try and achieve this effect
with who knows how much success. NB. the bonobo 'Control' code is
undergoing a substantial re-write.
So ... any ideas / hope ?
In other news - I get a bunch of warnings since it appears I'm
re-entering inside gtk_socket_unrealize -> gtk_widget_unrealize_real.
The sequence is a little like this:
socket's grandparent destroy ->
gtk_widget_unrealize on socket -> <-----------.
gtk_socket_unrealze -> | gtksocket.c:345
_gtk_plug_remove_from_socket -> | gtkplug.c:274
gtk_widget_destroy of socket -> |
gtk_container_remove of socket from parent -> |
gtk_widget_unrealize on the socket -----------'
I imagine it doesn't infinitely recurse because of the
trickery in gtk_widget_destroy to stop double destroys ( or sim. ).
Either way - one 'obvious' fix, might be to mark the widget unrealized
before doing the _gtk_plug_remove_from_socket; indeed I've added
something like this to BonoboSocket temporarily.
HTH,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]