home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: Double Click in a window (Motif Drawing Area)
- Message-ID: <1992Jul24.183723.583@thunder.mcrcim.mcgill.edu>
- Keywords: Mouse Events, double click, drawing area, ButtonPress
- Organization: McGill Research Centre for Intelligent Machines
- References: <50599@dime.cs.umass.edu>
- Date: Fri, 24 Jul 92 18:37:23 GMT
- Lines: 21
-
- In article <50599@dime.cs.umass.edu>, nikoulis@venice.pilgrim.umass.edu (Panos Nikoulis) writes:
-
- > Is there a way to detect a double click mouse event in a window
-
- Not reliably. The protocol does not contain enough support to allow
- this to be done right. (It needs some sort of timeout event.)
-
- > Currently, I am using time functions to make it "wait" for a time
- > equal to the double click interval and detect a second ButtonPress
- > after the first one (inside the Drawing Area callback).
-
- Some toolkits/widget sets contain code that does this for you. It'll
- work as well as your code does, presumably, but will suffer from the
- same basic problem: it can lose big in the presence of network hiccups
- (it can fail both ways: it can mistake a double click for two single
- clicks, and it can mistake two single clicks for a double click).
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-