[comp.windows.x] Moving window from one display to another - how to?

clindh@sunrise.abalon.se (Christer Lindh) (08/31/90)

Is it possible in X to switch display for a client/window?

Say I want to show a co-worker something I have in a xterm window, I
would then like to be able to tell that window to start using his
display instead, he can take a look at it and then give me the window
back. Is this at all possible, and if so how do I do it?  Does the client
need special code for this or can a window manager handle it? 

I'm quite a novice on X so if this question is silly/frequently
asked/dumb or in any other way an annoying waste of bandwidth, please
reply by mail :-)
--
        clindh@abalon.se              ::     o/    
   Abalon AB, Stockholm, Sweden       ::    /@     fight gravity,
                                      ::    <!\        climb.
     *All disclaimers apply*          ::     !     

klee@wsl.dec.com (Ken Lee) (09/01/90)

In article <CLINDH.90Aug31103445@sunrise.abalon.se>, clindh@sunrise.abalon.se
(Christer Lindh) writes:
|> Is it possible in X to switch display for a client/window?
|> Does the client
|> need special code for this or can a window manager handle it? 

The client has to do this.  The X protocol does not allow windows to be
moved from one display to another or even from one screen to another of
the same display.  You could write a client that copied an image from
one display to another, but, of course, only the original would be
interactive.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee

bagchi@eecs.umich.edu (Ranjan Bagchi) (09/03/90)

In article <1990Aug31.233112.3500@wrl.dec.com> klee@wsl.dec.com (Ken Lee) writes:
   In article <CLINDH.90Aug31103445@sunrise.abalon.se>, clindh@sunrise.abalon.se
   (Christer Lindh) writes:
   |> Is it possible in X to switch display for a client/window?
   |> Does the client
   |> need special code for this or can a window manager handle it? 

   The client has to do this.  The X protocol does not allow windows to be
   moved from one display to another or even from one screen to another of
   the same display.  You could write a client that copied an image from
   one display to another, but, of course, only the original would be
   interactive.

==============================

	A kludgy way that I've been using is this:
	xgrabsc -W | xwud -display <whatever> &

	This'll let you copy the screen section, and bring it up
as a window on the other display.

	xgrabsc came across comp.sources.x a few weeks ago, if I
remember correctly.

   Ken Lee
   DEC Western Software Laboratory, Palo Alto, Calif.
   Internet: klee@wsl.dec.com
   uucp: uunet!decwrl!klee

	-rj
	bagchi@eecs.umich.edu

janssen@parc.xerox.com (Bill Janssen) (09/07/90)

This is actually a quite reasonable question.  The answer is that
the client needs special code to close the current display and reopen
on a different display.  A well-designed toolkit might include this
capability, though I know of only one that does, just now:  X11 Viewers
for Cedar.  GNU Emacs used to have code to do this, and still might.

Bill
--
 Bill Janssen        janssen@parc.xerox.com      (415) 494-4763
 Xerox Palo Alto Research Center
 3333 Coyote Hill Road, Palo Alto, California   94304