Path: utzoo!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!magnus.ircc.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Double Mouseclicks and XImage buffer size Message-ID: <9103100859.AA08333@lightning.McRCIM.McGill.EDU> Date: 10 Mar 91 08:59:52 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 24 > 1) How can I detect double mouse clicks in a portable way? You can't. As you've noticed, there is no way to ask the server for a timer event, or anything similar. > I have written a loop that sleeps for a small period of time and then > checks the event queue. After the double-mouse-click interval has > passed (and no events are detected) I note a single mouse click. It would be better to wait until an event is received, and if you don't get any, force the server to generate one (such as a zero-length append to a property). Then you can get your time values from the server all the time, thus making the code reliable, even if it does require an extra round-trip. (Why don't I count this as "portable"? Because it involves playing with (typically) sub-second timeout values.) I'm hoping R5 will improve this. One of the talks at the X conference included something about an input server sort of thing; if done right, this should be able to cure things. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu