keith@airgun.wg.waii.com (Keith M. Fernandez) (02/13/90)
I am having problems implementing inter-client communication using X properties. I have 2 X clients running wherein application 1 is trying to receive a property supplied by application 2. Until now, properties were hung from the root window and everything was fine. We would like to implement an event handler so that applications can be driven by changes in properties. The problem is this: XtAddEventHandler must be supplied a widget in which specified events are to be trapped and we have no widget for the root window. Furthermore, we can't find a way of supplying 2 or more applications with a common widget for property exchange. I've tried passing window id's (using XtWindowToWidget on the receiving end) and widget structures through the root window, but have met with little success. Can anybody offer some help?
paulm@hpcvlx.cv.hp.com (Paul J. McClellan) (02/14/90)
> I am having problems implementing inter-client communication using X > properties. I have 2 X clients running wherein application 1 is trying to > receive a property supplied by application 2. Until now, properties were > hung from the root window and everything was fine. We would like to implement > an event handler so that applications can be driven by changes in properties. > The problem is this: XtAddEventHandler must be supplied a widget in which > specified events are to be trapped and we have no widget for the root > window. Furthermore, we can't find a way of supplying 2 or more applications > with a common widget for property exchange. I've tried passing window id's > (using XtWindowToWidget on the receiving end) and widget structures through > the root window, but have met with little success. Can anybody offer some help? I have achieved communication between one or more clients and a 'report' client by creating a widget in the report client and placing its window id on a property on the root window. The other clients understand what this root window property represents. They read it for the window id and send ClientMessage events to that window. I understand that this is not exactly what you have in mind. Perhaps you could modify this to have the clients change a property in that window, rather than send a ClientMessage event to it.