Path: utzoo!attcan!uunet!samsung!sdd.hp.com!wuarchive!mit-eddie!bloom-beacon!GATEWAY.MITRE.ORG!palmer From: palmer@GATEWAY.MITRE.ORG Newsgroups: comp.windows.x Subject: Re: Need help to fix error in "xlock" Message-ID: <9012112221.AA03683@gateway.mitre.org> Date: 11 Dec 90 22:21:32 GMT References: <1327@inews.intel.com> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 48 > Date: 11 Dec 90 18:47:23 GMT > From: bu.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!orc!inews!mipos2.intel.com!j poon@bloom-beacon.mit.edu > Organization: Intel Corporation, Santa Clara, CA > Subject: Need help to fix error in "xlock" > Message-Id: <1327@inews.intel.com> > Sender: xpert-request@expo.lcs.mit.edu > To: xpert@expo.lcs.mit.edu > > I am a navie user of X11. But recently I built the X11R4 > on sun386i. When i try to run 'xlock', it gives me the > following error: > > > X Error of failed request: BadValue (integer parameter out of range for operation) > > Major opcode of failed request: 26 (X_GrabPointer) > > Minor opcode of failed request: 0 > > Resource id in failed request: 0xffff > > Serial number of failed request: 32 > > Current serial number in output stream: 32 > This is an old error. There are several places in xlock.c where the following line is executed : XGrabPointer(dsp, w, True, -1, GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime); The problem is the "-1" in the event_mask parameter. You should replace this with something like : ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask (This is probably overkill but you get the idea.) Check the Xlib - C Library Manual, Chap. 7.4 on "Pointer Grabbing". ------------------------------------------------------ Forrest Palmer (703) 883-5668 Internet Engineering Testbed Administrator The MITRE Corp. - Washington Center MS W425, McLean, VA 22102 palmer@mitre.org ------------------------------------------------------