Mouse double-click


#1

Hi, Jules

I’ve found a weird mouse double-click behavior.
cellDoubleClick() in TableListBoxModel was called by the following operations.

  • Left mouse-click and Right mouse-click
  • Right mouse-click and Left mouse-click
  • Right mouse-click and Right mouse-click

I suppose this behavior is not only cellDoubleClick(). Probably, double-click should be counted only when left mouse is clicked, but I’m not sure whether OS API supports it in the mouse settings of a left-handed person.

By the way, I’ve just integrated v1.46 into my project, Thanks!

Programming Environment:
Mac OS X 10.5.3 / Xcode 2.5 / JUCE v1.46


#2

was gonna make a new thread, but it appears this behaviour has been here for a long time!

Basically, mouseDoubleClick should definitely not be called unless the two clicks are from the same mouse button. Currently, the only way around this is to keep a local result of e.mods.isRightButtonDown() updated on mousedown, and check that it is the same as e.mods.isRightButtonDown() in mouseDoubleClick. Shouldn’t really have to do this really though, as I can’t think of a single example of where alternated clicks are treated as a single gesture (one worthy of callback).


#3

Quite right. Thanks, this is really easy to fix, will do so right away…