[comp.windows.x] Multiple Applications usning the same window

ganz-alfred@CE.YALE.EDU (Alfred Ganz) (05/20/89)

Ladies and Gentlemen,

We are in the process of building a relatively large window application for
the X System (X11R3 to be more specific) under Unix (Ultrix 3.0 to be more
specific). We think that others must have tried to do similar things and we
would like to avoid reinventing the wheel. Could someone therefore tell us
how to best approach the following situation.

Our System consists of a parent program that invokes sequences of multiple
child programs (all separate processes) according to the users requests.
At this time the various programs are not executed in parallel (although we
might not want to maintain this constraint). Ideally the user should not be
aware of the multitude of programs involved. Many of these child programs
should ideally operate on the same hierarchy of windows, which from a
functional point of view could be established either by the parent program
or by a proper first child program.

>From our understanding of X11, the resources associated with a window are
owned by a specific program, and while other programs can read the resources,
many (or is it all?) resources can only be changed by its owning program (we
are mainly concerned with geometry, colormap, and event handling). One way of
managing the windows in the hieararchy descibed above is of course to have a
single window managing process and have all the other processes interact with
it through process to process communications. However, this seem rather
unwieldy for our purposes.

Our questions are, is there a way to either make these resources changable by
other programs (the world?), or is there a way to pass off ownership of the
resources associated with a hierarchy of windows from one program to another?

Any help on this will be greatly appreciated. AG

rws@EXPO.LCS.MIT.EDU (05/20/89)

    From our understanding of X11, the resources associated with a window are
    owned by a specific program, and while other programs can read the
    resources, many (or is it all?) resources can only be changed by its owning
    program (we are mainly concerned with geometry, colormap, and event
    handling).

Most resources can be freely manipulated in all ways by any client, not just
"read" by them.  This includes geometry, colormaps, and event handling.  There
are some restrictions, e.g. a writable colormap entry allocated by one client
cannot be freed by another, an event selection made by one client cannot be
unselected by another.  I suspect you'd have to be quite a bit more specific
about your requirements to know where the gotchas really are.

klee@gilroy.pa.dec.com (Ken Lee) (05/20/89)

>Our questions are, is there a way to either make these resources changable by
>other programs (the world?), or is there a way to pass off ownership of the
>resources associated with a hierarchy of windows from one program to another?

I've had no problem with multiple clients sharing windows.  In particular, I have drawn on windows, changed geometry, selected events, and grabbed events on a shared set of windows from multiple clients.  You do, of course, have to establish a priv