home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / openloo / 3566 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  1.4 KB

  1. Path: sparky!uunet!cs.utexas.edu!news
  2. From: julian@cs.utexas.edu (Dun Julian Wong)
  3. Newsgroups: comp.windows.open-look
  4. Subject: Xview: Drawing to the user interface from another process
  5. Date: 22 Aug 1992 23:11:55 -0500
  6. Organization: CS Dept, University of Texas at Austin
  7. Lines: 23
  8. Message-ID: <l9e40bINNth@saltillo.cs.utexas.edu>
  9. NNTP-Posting-Host: saltillo.cs.utexas.edu
  10.  
  11. I am writing an X-Window application using Xview. There are two processes in 
  12. the program that are run concurrently. One of the process is the user
  13. interface, which is controled by xv_main_loop(). The other is my main() program.
  14. During run-time, I want to draw something to the user interface FROM the main()
  15. program. These drawings(frequency and appearence) are totally independent of the 
  16. user interface, and cannot be controled by event handlers and xv_main_loop of 
  17. the user interface.
  18.  
  19. I get various values of dislay, window and gc of the user interface BEFORE 
  20. calling fork() to start the child process -- which is essentially xv_main_loop().
  21. However, this didn't work. When the the main()  prgram starts draw -- 
  22.                       XDrawLine(markwin_dpy,markwin_xwin,markwin_gc,20,30,30,40);
  23.                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24.                      these value are obtained by the repaint
  25.                  routine of while creating the canvas
  26.                  which is done before calling fork() to
  27.                  start xv_main_loop().
  28. I got segementation fault(core dump) error. Would someone help me on this probem?
  29.  
  30. Sincerely,
  31. -Julian
  32.  
  33.  
  34.