home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: Sending X events between processes
- Message-ID: <1992Nov7.234742.15244@thunder.mcrcim.mcgill.edu>
- Organization: McGill Research Centre for Intelligent Machines
- References: <1992Nov6.051103.22995@colorado.edu>
- Date: Sat, 7 Nov 92 23:47:42 GMT
- Lines: 26
-
- In article <1992Nov6.051103.22995@colorado.edu>, crosby@juliet.cs.colorado.edu (CROSBY MATTHEW JAME) writes:
-
- > I have written a program that initialises the X windows stuff, and
- > then forks(). I am attempting to send events from the parent to the
- > child process, but they don't seem to be processed. I am using Xlib,
- > and the XSendEvent function. Is this impossible? Is there something
- > I am missing?
-
- You haven't given enough information. Since you explicitly mention
- that you initialize X before forking, I assume that both processes are
- using the same Display connection. This *will not work* - or rather,
- making it work is so extremely hard that if you had any hope of doing
- it, you'd perforce know enough that you wouldn't need to ask what you
- did.
-
- What you need to do is for one of the processes to open a new
- connection and use that. (You may want to close the old one, but do it
- carefully: don't use XCloseDisplay. Instead, use
- close(XConnectionNumber(theolddisplay)).) Alternatively, you can have
- one process do all the X stuff and have it communicate with the other
- process via a pipe...
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-