[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] [Evas] double click issues



On Fri, 25 Aug 2006 18:14:57 +0200 Simon TRENY <simon.treny@free.fr> babbled:

> On Fri, 25 Aug 2006 12:04:40 +0300,
> Eugen Minciu <minciue@gmail.com> wrote :
> 
> > On Fri, 25 Aug 2006 11:13:08 +0200
> > Simon TRENY <simon.treny@free.fr> wrote:
> > 
> > If you've ever used an older LAPTOP with the trackball thingie (hey,
> > I still do!) you'll know sometimes you find yourself moving the
> > pointer just a little with double clicks. And that fact that that
> > doesn't register as a double click is somewhat annoying. 
> > 
> > It would be better if instead of demanding the exact same place, you
> > could demand two clicks in the same region.
> 
> Yes, you're right. Actually, it seems that's how Windows and Gtk
> detects the double-click: there should be two quick clicks in a small
> region (4-pixels wide maybe).

yes - now i am a bit late in this thread. yes it's feasible and sensible to do
this based on pixel location too - but i was going to say - exact x,y is not
feasible. a lot of people are entirely incapable of keeping a mouse still on
clicks - that's why yous see all sorts of fuzzy "resistance" or hysteresis on
dragging etc. etc. - double click too. you would need to have the mouse be
within X pixels of the previous mouse down location (X being small like 2 or 4
or 6 or so).

> Another problem I forgot to mention previously. The "flags" member of
> the "mouse up" events are always set to EVAS_BUTTON_NONE. So there is
> no way to detect a double/triple-click when the mouse is released.

mouse up events weren't intended to have the flag :) only down as the
double/triple clikc is on the down event.

> Cheers,
> Simon
> 
> > 
> > > Hey there,
> > > 
> > > I've got some problems with the "flags" member of the "mouse down"
> > > events of Evas. Sometimes those flags are not set correctly.
> > > 
> > > - First example, I have a smart object (an Edje object in this
> > > case). When I click on a part ("part1") of the Edje object, an
> > > other part ("part2") is shown and covers up "part1". So now,
> > > "part2" receives the mouse events. Now, if I double-click on
> > > "part1", on the first click "part2" will appear, and the second
> > > click will be then received by "part2", and be detected as a
> > > single-click (which is normal since it's the first click "part2"
> > > has received). But when the click event is propagated to the smart
> > > parent (in this case, the edje object), the mouse flags won't be
> > > changed and the edje object will receive a single-click event while
> > > the user has double-clicked on it. So there is no way to
> > > double-click an edje object like this (that's why the icons can't
> > > be double-clicked in the iconbox of Etk). (I've attached a small
> > > program that shows that)
> > > 
> > > - Second problem, when you double-click in the entry of e17, all the
> > > text is selected. Now, if you click to move the cursor at the mouse
> > > position, and then click at another point of the entry to move the
> > > cursor again, if you do that quickly, the second click will be
> > > detected as a double-click and all the text will be selected.
> > > 
> > > 
> > > I think an easy and good solution to these two problems would
> > > be to change the definition of a double-click. I think a
> > > double-click should be two clicks in a quick time interval, *IF*
> > > the mouse hasn't moved between the 2 clicks. I think that's how
> > > they are defined in Gtk, Windows and Qt. Since evas shouldn't be
> > > aware of the time, we can not detect the double-clicks in Evas, so
> > > I guess it should be done in Ecore_Evas. Ecore_Evas already does
> > > that, but it doesn't check if the mouse position has changed. Evas
> > > should then just transmit the flags given by Ecore_Evas to the
> > > clicked objects. There is no more need to use the
> > > "last_click_counter" thing that I asked before, since a quick
> > > "click-move-click" sequence won't be detected as a double-click
> > > anymore. The only remaining problem with this solution, is that, in
> > > my first example, if you double-click on the edje object, "part2"
> > > will receive a double-click instead of a single-click. But I don't
> > > think that this is too important.
> > > 
> > > If you think this solution is better than the current one, I can
> > > implement it.
> > > 
> > > 
> > > Regards,
> > > Simon TRENY
> > > 
> > 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)