home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vtserf!creatures!csgrad.cs.vt.edu!ramakris
- From: ramakris@csgrad.cs.vt.edu (S.Ramakrishnan)
- Newsgroups: comp.windows.x.motif
- Subject: Re: two processes with one window?
- Message-ID: <3944@creatures.cs.vt.edu>
- Date: 21 Dec 92 21:57:04 GMT
- References: <1992Dec18.144058.20973@walter.bellcore.com>
- Sender: usenet@creatures.cs.vt.edu
- Organization: VPI&SU Computer Science Department, Blacksburg, VA
- Lines: 29
-
- In article <1992Dec18.144058.20973@walter.bellcore.com> john@bivalve.bellcore.com (John Snow)
- writes:
-
- >I have a situation where I want a background program to have control of
- >a portion of a window, specifically a drawing area. It would be nice if
- >I could fork off another process and pass it the widget id of the drawing
- >area, but I know things couldn't possibly be that easy. Is it possible
- >to do something like this, and if so, could someone give me some hints
- >as to how to do it?
-
- Its indeed possible to fork and have the child take care of a portion of the drawing area.
- However, the child should not access the same display connection (ConnectionNumber(display))
- as the parent. Otherwise, your processes will hang.
-
- That is, the child must open the display afresh. The parent and the child *should not*
- share the widget tree, since widget points to the ConnecionNumber. That is,
- the child had better be a separate program, managing the drawing area using Xlib
- calls alone, after opening the display. Prior to forking, you may store the window id of
- the drawing area and the (x,y,width,height) of the section that the child needs to
- manage in a rootwindow property and have the child access it after it comes up.
-
- Unless the drawing/repainting of the drawing area is unusually complex, the gain in
- execution efficiency does not warrant the yucky implementation that
- is bound to result with the use of forking.
-
- > John Snow
-
- ---
- S Ramakrishnan, CS Dept, McBryde Hall, VaTech
-