Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.8.3
Description
The code in question is about:
https://github.com/qt/qtbase/blob/6.8.3/src/plugins/platforms/cocoa/qnsview_mouse.mm#L500
Consider 1 QWidget overlaps the other. And the one on top is transparent to mouse event. Moving mouse around the overlapping area, then the consequence is:
1. Top widget first becomes QCocoaWindow::s_windowUnderMouse. But mouse event passes through.
2. Bottom widget then also becomes QCocoaWindow::s_windowUnderMouse, and top widget becomes windowToLeave
3. In that case,
QWindowSystemInterface::handleEnterLeaveEvent(QCocoaWindow::s_windowUnderMouse->window(), windowToLeave->window(), windowPoint, screenPoint);
will be triggered. Then we are leaving top widget and entering bottom widget.
4. As long as mouse is moving around, steps 1~3 are going to be triggered indefinitely.
So is "indefinitely spamming enter/leavrEvent"a problem? Or is such design (overlapping widget while the top one let mouse events through) actually someone should never do?