Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!TRANTOR.HARRIS-ATD.COM!mac From: mac@TRANTOR.HARRIS-ATD.COM (Mike McDonald) Newsgroups: comp.windows.x Subject: Re: XGrabPointer and ButtonPress Message-ID: <19890215151253.3.MAC@titan.harris-atd.com> Date: 15 Feb 89 15:12:00 GMT References: <8902151332.AA03428@EXPIRE.LCS.MIT.EDU> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 27 Date: Wed, 15 Feb 89 08:32:34 EST From: rws@expo.lcs.mit.edu (Bob Scheifler) You're getting a BadAccess on ChangeActivePointerGrab because your application is using two connections in conflict. On one connection you select for ButtonPress on the root window. When the button gets pressed, a grab is activated. Subsequently you try to ChangeActivePointerGrab on the *other* connection. This is a no-no. A "client" is defined by a connection, not by an address space. And I imagine that there is no way to find an already existing connection using Xlib. What I was trying to do was implement a SunWindows compatible library. Most of the users around here have Suns and won't consider switching to X unless I find an easy way for them to convert their existing code. I'll have to rethink my approach now. Thanks for your time. Mike McDonald P.S. I think you should be able to grab the mouse even if another connection has it grabbed. Example usage: The system is going down so I pop up a notifier on your screen. I want the user to have to acknowledge the notifier immediately so I can either stop the shutdown or continue without having to listen to the user belly ache later about the system being down while he has so much important news to read.