Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!dce From: dce@smsc.sony.com (David Elliott) Newsgroups: comp.windows.x Subject: Re: xlock - event mask argument to XGrabPointer Message-ID: <1989Dec19.005753.16316@smsc.sony.com> Date: 19 Dec 89 00:57:53 GMT References: <1989Dec16.002825.10200@smsc.sony.com> <2296@bacchus.dec.com> Reply-To: dce@Sony.COM (David Elliott) Organization: Sony Microsystems Corp. Lines: 29 In article <2296@bacchus.dec.com> klee@decwrl.dec.com writes: >In article <1989Dec16.002825.10200@smsc.sony.com>, dce@smsc.sony.com >(David Elliott) writes: >> Is -1 a special value meaning "all events that apply", so that the >> server should accept the value unquestioningly? Or, should xlock >> be more specific with its event mask in this case? > >The XGrabPointer event mask has type unsigned int, so, on most hardware >with sloppy compilers, putting a -1 in there will be converted to a >word with all bits on. What a hack. I understand that part (I noticed the 'unsigned' in the manual), and I even accept its use (though maybe a define for AllEvents would be a better idea). The question that remains is: should XGrabPointer accept a mask with all 1's as "all events that apply", or should it check the value and raise an error if it sees any events that aren't correct for that call? If one application has made the assumption that this will work because it works on at least one server, and if X doesn't define it not to, other application writers may do the same thing. -- David Elliott dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce | (408)944-4073 "As I never read this newsgroup or my email, please send replies via carrier pigeon."