click and double click gestures rewritten