title: Unable to get double click event in OpenCV for python
body: <h1>OpenCV with python(MAC OS X EL Capitan)</h1>
  <p>I'm creating a demo project to track mouse events in openCV. using standard mouseCallback from openCV.</p>
  <p>following is my code for the same.</p>
  <p><strong>drawWithMouse.py</strong></p>
  <pre><code>#!/usr/local/bin/local/python3
  import numpy as np
  import cv2 as cv
  
  #Mouse callback function
  def draw_shape(event,x,y,flags,param):
      print(&quot;event : &quot;,event)
      if event == cv.EVENT_LBUTTONDBLCLK:
          cv.circle(img,(x,y),100,(255,0,0),-1)
  
  #Create a black image, a window and bind the function to the window
  img = np.zeros((780,780,3),np.uint8)
  cv.namedWindow('DrawWithMouse')
  cv.setMouseCallback('DrawWithMouse',draw_shape)
  
  while(1):
      cv.imshow('DrawWithMouse',img)
      if cv.waitKey(10) &amp; 0xFF == 27: #ANDing with 0xFF as my machine is 64 bit
          break
  
  cv.destroyWindow('DrawWithMouse')
  </code></pre>
  <p>with this implementation i'm always getting mouse down and mouseup event and only single click event. i'm unable to get double click event(EVENT_LBUTTONDBLCLK). value for this constant is 7.</p>
  <p>i'm getting following output <a href="https://i.stack.imgur.com/GpE0M.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GpE0M.png" alt="event : 1 is mouse down and event: 4 is mouse up" /></a></p>