Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!inria!mirsa!mbili!colas From: colas@mbili.inria.fr (Colas Nahaboo) Newsgroups: comp.windows.x Subject: Re: Help with double-click recognition. Message-ID: <256@mirsa.inria.fr> Date: 17 Oct 89 12:56:20 GMT References: <1922@bacchus.dec.com> <603@granite.dec.com> Sender: news@mirsa.inria.fr Reply-To: colas@mbili.inria.fr (Colas Nahaboo) Organization: INRIA Sophia Antipolis Lines: 26 In article <1922@bacchus.dec.com>, asente@decwrl.dec.com (Paul Asente) writes: > There really is a reason for it. X is network-based. There's no way for > an application to know, upon receiving one button click, whether there's > another one coming along. This is not due to the network nature of X, just to the fact that in the current MIT sample server implementation, the timestamp is only updated on key/mouse events. If the planned enhancement make it to R4 (having some requests, such as ChangeProperty, update correctly the timestamp), then you can implement a REAL double click by, if the input event queue is empty, sending PropertyAppend of NULL length at fixed intervals in your client time, which will return a property notify with the correct timestamp (now (R3) you get only the same time as the last key/button event) in the server time. Then, as soon as the timestamp exceeds some the value you know you have only a single click, unless you receive a second click in the meantime, of course. Hope this will make its way in the R4 toolkit, too :-) Colas NAHABOO BULL Research FRANCE -- Koala Project (GWM X11 Window Manager) Internet: colas@mirsa.inria.fr Surface Mail: Colas NAHABOO, INRIA - Sophia Antipolis, 2004, route des Lucioles, 06565 Valbonne Cedex -- FRANCE Voice phone: (33) 93.65.77.71, Fax: (33) 93 65 77 66, Telex: 97 00 50 F