Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Single click vs double click Message-ID: <9010180741.AA14602@Larry.McRCIM.McGill.EDU> Date: 18 Oct 90 07:41:28 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 34 > I'm getting ready to have to change a program such that a single > click on a widget (say, an Athena command button) will be different > than a double click on that same widget (a single click will bring up > a menu while a double click will redo the last selection). > I seem to remember that there is a "problem" under the toolkit > distinguishing between single and double clicks (they both fire the > corresponding handlers). Close. > Before I re-invent the binary wheel, can someone point me to some > existing example code (either with the X11R4 distribution or on the > net) that distinguishes between and ? The current X architecture does not permit a client to correctly identify a single click as distinct from the first click of a double click. It is possible to fake it by doing the timing in the client, but this leads to hiccups in the presence of flaky networks (ie, in the presence of networks). Thus, the Xt attempt at handling double clicks will invoke the single-click handler on the first click, then the double-click handler on the next click (if it's within the time limit), etc. This means that the single-click action must be undoable or subsumed into the double-click action. The situation is less than ideal, I agree. I am hoping R5 improves matters. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu