Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU Newsgroups: comp.windows.x Subject: Re: XGrabPointer behavior Message-ID: <9102081355.AA00373@lightning.McRCIM.McGill.EDU> Date: 8 Feb 91 13:55:20 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 36 > I am trying to write a client which does the following: > 1) Grabs the pointer, and allows the user to draw a rubber box on the > root window. > 2) Once this box is defined, [...] > The second part is easy. The first part is giving me a headache. > The program I am working with currently displays a dummy window > (which I would like to get rid of), then does a XGrabPointer and > follows the motion events, drawing/redrawing the rubber box as > appropriate. This seems to work OK. However, despite the fact that > I've done a pointer grab, the button press events are lost unless the > pointer is in the client's dummy window. Am I misunderstanding the > function of XGrabPointer, or am I missing something more subtle? As for getting rid of the dummy window, well, why not use the root window of the screen as the grab and confine-to windows for the grab? Why create another window for the purpose? As for missing ButtonPress events, this could be a misunderstanding of the way pointer events are distributed when a grab is active. I'd need to see the arguments to XGrabPointer to say much more. > Also - for my education, I would like to see the source to xwd, but I > don't know where to get it. Can anyone tell me where to look that > doesn't require ftp? It's on the MIT X tape, mit/clients/xwd/ and files therein. If you don't have the MIT distribution, I can't suggest much but consulting your friendly neighborhood archive site.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu