Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!husc6!psuvax1!sanjeev From: sanjeev@psuvax1.cs.psu.edu (Sanjeev Y. Dharap) Newsgroups: comp.windows.x Subject: XSendEvent Keywords: sending events Message-ID: <1989Aug7.024808.7140@psuvax1.cs.psu.edu> Date: 7 Aug 89 02:48:08 GMT Organization: Penn State University Computer Science Lines: 31 I need some help with XSendEvent. What I am doing is the following. I want to unmap a window on a KeyPress event, so I dont look at the rest of the event structure. I want this event to be generated by another client, so I call XSendEvent with send_event.xany.window = window; send_event.xany.display = display; send_event.xany.type = KeyPress; XSendEvent(display,window,False,KeyPress,&send_event); I am trying this first by making the client send a KeyPress event to itself. The call to XSendEvent returns 1, but no event is sent. I am printing the event type immediately after the XNextEvent. The questions are; a. Must the window be either of PointerWindow or InputFocus? b. Does the server look at the event structure in the call? c. What is a clean way to communicate to the other client, the display and window parameters? I am using sockets. d. Possible solutions to my problem? thanx in advance, sanjeev.