sherman@sas.UUCP (Chris Sherman) (03/07/90)
I may have found a problem with R4. I have been experimenting with sample code that I found in Young's X WINDOW SYSTEM (Motif version). Xtalk is a program that communicates between two sessions of the program on two different displays. It uses XSendEvent and other goodies. It works under R3, but not under R4. And I'm 99% sure that it has nothing to do with the widgets. The program, as listed in the book, uses -1L (XtAllEvents) for an event mask going into XSendEvent, and I believe that I read somewhere that R4 doesn't like this, so what else should I use??? But I can't figure out why this program doesn't work. It comes up ok, you tell it what display you want to xtalk to, hit the connect button, and it just sits there. When I have run the program on both an R3 and a R4 server, the R4 version just locks, and the R3 connects back to itself even though I told it to connect to the other display. Thanx for any help, Chris ps. The code for the program is available by anonymous ftp (from where, I'm not sure. I got the code from X class).
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (03/08/90)
The program, as listed in the book, uses -1L (XtAllEvents) for an event mask going into XSendEvent, and I believe that I read somewhere that R4 doesn't like this, That is correct. The mask must only indicate legal event bits, and -1 includes illegal bits. The fact that Intrinsic.h has XtAllEvents defined as -1 is probably a big mistake. so what else should I use??? I haven't actually tried it, and I've only spent a few seconds looking at the example in the (non-Motif) book, but try just plain zero. This will cause the event to go to the owner of the remote_talker_window, rather than following some arbitrary event mask.