Without this patch in svn, place 3 CCs in Atlas for Player 1, click Play, and try to click on your CC. This fails (selecting all 3) because Atlas does not pass up the clicks attribute of the event to input.js, needed since D326. This patch passes up the clicks attribute from Atlas.
However, note that Atlas relies on wx for mouse events, not SDL, and wx does not actually track clicks. see http://docs.wxwidgets.org/trunk/classwx_mouse_event.html#adc4d39b626fcc62e93d9356a32003273 . Therefore, the workaround is to pass up 1 for single click events, and 2 for double click events.
The caveat is, this means triple clicks do not work in Atlas. Can a triple click be detected from two consecutive double clicks? No, because if you triple click in wx, the double click is registered only on the second click, not on the third. The only way to detect triple clicks in Atlas would be to go back to the old behavior of using our own timer and motion threshold in javascript, which elexis agreed is not preferred.
Another note: wx only registers the double click on mousedown, not on both mousedown and mouseup like SDL does. So it is now necessary to store the number of clicks on mousedown in input.js.