Hi, On Thu, 24 Mar 2005 15:51:21 +0100, Jochen.Baier@xxxxxxxxxxxxxxxxxxxxx <Jochen.Baier@xxxxxxxxxxxxxxxxxxxxx> wrote: > Quoting KC <kcc1967@xxxxxxxxx>: > > > Hi, > > > > > > On Thu, 24 Mar 2005 07:49:23 -0500, Owen Taylor <otaylor@xxxxxxxxxx> wrote: > > > On Thu, 2005-03-24 at 18:43 +0800, KC wrote: > > > > Hi, > > > > > > > > Let me describe the problem first. I wrote a simple test program, > > > > gdk_socket_add_id.c, and try to steal a legacy X app., xeyes. > > > > > > > > I'm using Fedora Core 2 (with gtk+-2.4.14). The procedure is as > > > > following: > > > > > > > > > xeyes & <CR> > > > > > xwininfo <CR> ..... then click on xeyes, I get WID, eg 0x2c00007. > > > > > gdk_socket_add_id 0x2c00007 <CR> > > > > > > > > The result is two windows instead of one (xeyes embedded in embedder), > > > > but xeyes will resize if I resize the embedder. Looks like xeyes > > > > does been controlled by embedder ... but reparent is not working. > > > > > > plug/socket is not designed for stealing, which is impossible to get > > > entirely right. It's designed for a pair of a cooperating embedder > > > (GtkSocket, say) and client (GtkPlug) speaking the XEMBED protocol. > > > > > > Regards, > > > Owen > > > > > > > I agree. As far as I know, GtkSocket/GtkPlug are been used a lot in Bonoboo > > and probably designed for Bonoboo (this I'm not sure). > > However, the problem I mentioned did not related to both GtkSocket/GtkPlug, > > it's X reparent problem. I just want to know if the patch I posted worthy > > to > > apply or does XReparentWindow() do have such problem for some window > > managers. > > > > And IMHO, although GtkSocket/GtkPlug may not design for kidnapping legacy > > X applications ... it does work fine for such purpose. Specially, when > > using > > such trick for text based interactive utilities such as gnuplot, GNU > > Octave, Maxima ... etc > > most of them don't know what's XEmbed protocal ... but they do worth > > to kidnap :-) > > > > > > hi, > > you can look on the code from my program alltray > (http://alltray.sourceforge.net/). version 0.1 uses gtksocket stuff, all others > direct xlib calls. (focus works better with handmade reparent, drag n drop does > not). Alltray waits till the window changed the state to withdrawn before it > reparents. (http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1) > > regards jochen There are a lot of useful trick in alltray ... Thanks. Regards KC > > _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list