Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Single/Double Click Message-ID: <9004080623.AA02917@Larry.McRCIM.McGill.EDU> Date: 8 Apr 90 06:23:02 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 39 > I need to be able to cause two different actions depending on whether > I click once or twice on a mouse button. My translation table looks > (in part) like this: > (2): action_one\n\ > ,: action_two\n\ > With this table, a single click calls action_two as required, but a > double click calls action_two followed by action_one. How can I > ensure action_two is not called from a double click? I think you can't. You see, X does not have mouse clicks. All it has is button presses and releases. (And motion events, but those are irrelevant to the discussion at hand.) Xt tries to fake clicks with this, but the lack of a mouse timeout event makes it difficult, and the result therefore has problems, not surprisingly. In particular, if you want to do on a single click and on a double click, you have to make sure either that is a subset of or that is undoable. This is because is done after the first click regardless of whether it's the first click of a double-click or not. I think X should have mouse timeout events of some sort, that is, some sort of event that can be requested saying that "the mouse hasn't changed state in