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

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

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.

> 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