Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!oliveb!amdahl!netcom!aed From: aed@netcom.COM (Andrew Davidson) Newsgroups: comp.windows.x Subject: beginer needs help client messages Message-ID: <26840@netcom.COM> Date: 4 Mar 91 22:50:57 GMT Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 59 Hi I am having some trouble with interclient communication in X11r4. I am trying to use client messages. I have a slider, with a call back. the last thing this call back does is call XSendEvent. The first call to XSendEvent appear to work, but the second time it is call I get the following message from the server, then my program dies cataed:8% X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 25 (X_SendEvent) Minor opcode of failed request: 0 Resource id in failed request: 0xffffffff Serial number of failed request: 98 Current serial number in output stream: 99 what does this mean? here is the call back. It is based on Doug Youngs Chapter 11. I had to cast the event in the XsendEvent() becuase I am working in C++ and could not get it to compile with out it. void SliderMoved(Widget w, CurveData *data, XmScaleCallbackStruct *callData) { data->rate = callData->value; DisplayValue(data); /* * send client message */ Display *dpy = XtDisplay(w); Window root = DefaultRootWindow(dpy); MSG_ATOM = XInternAtom(dpy, "MARKET_MOVEMENT", FALSE); XClientMessageEvent event; event.display = dpy; event.window = root; event.type = ClientMessage; event.format = 8; event.message_type = MSG_ATOM; event.data.b[0] = '\0'; XSendEvent(dpy, root, TRUE, XtAllEvents, (XEvent *)&event); XFlush(dpy); } Thanks Andy -- ----------------------------------------------------------------- "bede-bede-bede Thats all Folks" Porky Pig Andy Davidson Woodside CA. aed@netcom.COM -----------------------------------------------------------------