Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!ingr!b11!doyle From: doyle@b11.ingr.com (Doyle Davidson) Newsgroups: comp.windows.x Subject: How we got Single Clicks in X Message-ID: <6403@b11.ingr.com> Date: 31 Oct 89 23:04:49 GMT Organization: Intergraph Corp. Huntsville, AL Lines: 36 We had a need for button clicks (i.e. down-up-timeout) and button presses (down-timeout) in X and it had to be reliable. Our solution? Add a button timeout extension! What we basically did was create a new event type that was generated some 'Y' amount of time after the last button transition. Thus to detect the difference between and press and a click, we will get one of the two event sequences: press-release (and soon a timeout or another press) or press-timeout (and eventually the release and another timeout) We added new requests so that only those windows that wanted timeout events got them and nothing ever disturbs regular X clients. Grabs are also handled nicely as well as multiple clicks while crossing window edges! (timeouts are generated when you leave the window) This way network delays are not a problem!!! Anybody see any holes? Doyle (is it too late to change r4? or wait for X12 :-) Davidson ------------------------------- Doyle C. Davidson Intergraph Corp. Workstation Graphics Standards 1 Madison Industrial Park Huntsville, AL 35806 (205) 772-2000 ..!uunet!ingr!b11!doyled!doyle -------------------------------