[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3048.0. "2 Processes drawing on same window" by BARNA::FURIO () Mon Jul 09 1990 11:20


	I'm trying to draw on the same window from two different 
   processes. One of them creates the window and send the display_id,
   screen_id and window_id to the other via mailbox.
        I always get an access violation when this one tries to use 
   the variables just received via the mailbox (the debugger tells me
   the values are correct)

	Anything wrong in the logic of the application? 
        Any suggestion?


				Thanks, Xavi
 
T.RTitleUserPersonal
Name
DateLines
3048.1PSW::WINALSKICareful with that VAX, EugeneMon Jul 09 1990 13:228
In the mailbox, you should be passing the display name (as passed to
XOpenDisplay) rather than the display ID, which is an address specific to one
particular process.  Likewise, you should pass the screen number, not the
address of the screen structure.  In the process that receives this information
through the mailbox, you must do an XOpenDisplay() before you try writing to
the window.

--PSW
3048.2Don't pass GCs eitherDECWIN::FISHERPrune Juice: A Warrior's Drink!Fri Jul 13 1990 10:099
BTW, just in case this gives someone other ideas, it is ok to pass most
resource ids between processes (i.e. windows, colormaps, pixmaps, etc) but
*not* GCs.  The gc that you get from XCreateGC is also a process-space address.

And yes, there is a way to get the actual X id out of it, but don't do that
either!  The GC information is cached in process space.  If there are caches
in two different processes, at least one of them will get confused!

Burns