Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!vaxa.nerc-murchison.ac.uk!E_CMA From: E_CMA@vaxa.nerc-murchison.ac.uk Newsgroups: comp.windows.x.motif Subject: Re:Attaching an X window process to a previously running X window pro Message-ID: <9106071436.AA21149@ucbvax.Berkeley.EDU> Date: 7 Jun 91 12:24:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 45 > 1. Is there a way for a seperate process (process A) to > call its on X window and then attach that called window to the > main application that is already running? This is crtical for us > so we can have the wm managing all the windows and so we know > what windows are currently alive. Yep. I have done that sort of thing in prototype and it works fine. There is a fairly comprehensive treatment on inter-client communications in Chapter 11 of Douglas A. Young's "The X Window System - Programming and Applications (with Xt)" and I dare say in other standard X tomes too. In essence seperate processes can communicate with each other via Atoms using Property Notify Events. Your "child" application defines an Atom with the same name and display i.d. as one defined by the main application and does a XChangeProperty on it. This is picked up by the main applications event loop where the PropertyChangeMask has been set using XSelectInput to allow the main application to "receive" Data can be retrieved from the Atom by any client for which it is defined using XGetWindowProperty. > 2. Are shared libraries hard to work with? Are they > a lot of work? We are not sure we were wondering how some of > you who have tried them feel? Not particularly, although one can come across problems e.g. with DECW$XLIBSHR.EXE and ORACRTL.EXE. On the plus side your .EXE files tend to be of a more manageable size. Cheers Carolyn ************************************************************************* * Snailmail: * E_Mail * * * CBS%UK.AC.NERC-MURCHISON.VAXA::E_CMA * * Dr C.M.Allen * JANET: e_cma@uk.ac.nmh.va * * British Geological Survey * * * Murchison House * * * West Mains Road ** * * * * * Edinburgh * Tel: 031-667-1000 x277 from U.K. * * Scotland * * * EH9,3LA * * *************************************************************************