Path: utzoo!attcan!uunet!husc6!bloom-beacon!WSL.DEC.COM!haynes From: haynes@WSL.DEC.COM Newsgroups: comp.windows.x Subject: Re: Reparenting widgets Message-ID: <8808110050.AA11506@gilroy.pa.dec.com> Date: 11 Aug 88 00:50:50 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 22 We actually wanted really badly to allow repartenting of widgets, but just couldn't work out all the semantics in a way that satisfied us. We were particularly worried about reparenting widgets before they were realized, and reparenting composite widgets. I still believe it's possible to "safely" repartent a widget, but no one has ever taken the time to figure all of what's involved. If you're interested, I heartily encourage you to do the work and figure out what it would take to implement an XtReparent function. I would suggest restricting the Reparent to only the client that created the widget, and requiring the client to use XtReparent to do the work. Otherwise you end up with StructureNotify on all of your windows which causes an absolutely horrendous amount of unwanted information to be delivered to your application. One fairly simple "hack" way to do a reparent is to destroy the widget in its old position, remembering the values of its resources (read the resource list, then do a get values, then destroy it) then re-create it in the new place passing in all of the resources in the arg list. This isn't exacly the same as a reparent, but may be good enough. -- Charles