Repository: opencv
Issue: OS X (M1) - EVENT_MOUSEMOVE  firing at reduced frequency on trackpad only while click-and-dragging
Labels: bug,category: highgui-gui,platform: ios/osx

<!--
If you have a question rather than reporting a bug please go to https://forum.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)

- OpenCV => opencv-python==4.5.4.60
- Operating System / Platform => macOS Big Sur 11.1 (M1)

##### Detailed description

When using the mouse cursor to interact with an OpenCV window, I expect to receive a mouse event whenever the mouse is moved in click-and-drag mode. When using a USB mouse, these events are fired as expected. When using the built-in trackpad, these events are intermittently fired at a much lower frequency than expected, leading to an inability to accurately track the current mouse location.

This is **not** a hardware issue with the trackpad - The pointer itself still moves smoothly around the window.

Mouse:
Click and drag: Works as expected

Trackpad:
*Click and drag: Intermittently fails*

Using the example code below, observe the frequency of drag events that are printed to the console when using mouse vs. trackpad. With the mouse, hundreds of events per second are always fired. With the trackpad, events will intermittently be fired at 3-5 per second instead of the expected 100-plus.

##### Steps to reproduce
```.py
import cv2 as cv
import numpy as np

n = 0


def callback(event, x, y, flags, param):
    global n

    if event == cv.EVENT_LBUTTONDOWN:
        print('down event', flush=True)

    if event == cv.EVENT_MOUSEMOVE:
        print(f'drag event {n}', flush=True)
        n += 1

    elif event == cv.EVENT_LBUTTONUP:
        print('up event', flush=True)


cv.namedWindow(winname='Example')
cv.setMouseCallback('Example', callback)

img = np.zeros((512, 512, 3), np.uint8)

cv.imshow('Example', img)

while True:
    if cv.waitKey(10) & 0xFF == 27:  # esc
        break

cv.destroyAllWindows()
```

##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [x] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->