Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!bloom-beacon!mit-eddie!apollo!oj From: oj@apollo.uucp (Ellis Oliver Jones) Newsgroups: comp.windows.x Subject: Re: GrabPointer again Message-ID: <398d51bd.d5b2@apollo.uucp> Date: 8 Jan 88 14:09:00 GMT References: <880107-095710-7037@Xerox> Reply-To: oj@apollo.UUCP (Ellis Oliver Jones) Organization: Apollo Computer, Chelmsford, MA Lines: 26 In article <880107-095710-7037@Xerox> "Michael_K._Powers.WBST139"@Xerox.COM writes: >...Now I want to temporarily ask for a button down >event anywhere on the area defined by window A... I do this as follows: (a) creating an InputOnly window (sibling or child to A) the size of A (this is a "transient" window as far as any WM is concerned) (b) doing a MapRaised of the InputOnly window when I'm ready to start the "drag" mode you mentioned. (c) Accepting ButtonPress, ButtonRelease and MotionNotify events from the InputOnly window. (d) Do any echoing to window A with GXxor and IncludeInferiors (e) When I get the ButtonRelease (or otherwise get done with this operational mode), I unmap and destroy the InputOnly window (the easy way of dealing with the possibility that A will get resized by the WM). This works well. It also gives me a decent way to change the cursor (make a different one for the InputOnly window) to show the user that she's dropped into this mode. You might also try XGrabButton requests (for all the buttons, I guess; you weren't clear as to whether it was just one button that worked this way) in Window A. Specify a owner_events parameter of False. Then when the user presses any button, you'll start an active grab within window A, and you'll get all the events from Window A. Should work. /oj