Skip to content

[2 patches] QXcbWindow::handleLeaveNotifyEvent(): Consume when leaving geometry

[PATCH 1/2] QXcbWindow::handleLeaveNotifyEvent(): Consume when leaving geometry

QXcbConnection::mousePressWindow() returns the XCB toplevel window, which has consumed the window system's last mouse press. When the function returns a valid pointer, QXcbWindow::handleLeaveNotifyEvent() didn't propagate the leave event to QWSI::handleLeaveEvent(). Instead, the leave event was ingored.

That behavior is correct, e.g. when a button on the main window is pressed and the mouse hovers away from the button, with the mouse button continuously being pressed. It is not correct, if the mouse cursor leaves the main window.

=> Ignore the leave event only as long as the mouse cursor remains within mousePressWindow()->geometry(). => Deliver the leave event, when the mouse cursor leaves the window.

Fixes: QTBUG-119864 Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: I30a6ebedcd148285b9f17dfd87885ff67726b54c Reviewed-by: Liang Qi liang.qi@qt.io


[PATCH 2/2] XCB: Suppress leave event, when mouse leaves with button pressed

Fixes: QTBUG-124003 Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: I232f731b4b5f9e332b1297e5fdae2cadbdf2db1a Reviewed-by: Liang Qi liang.qi@qt.io Reviewed-by: Błażej Szczygieł mumei6102@gmail.com (cherry picked from commit 80bfeb4e)

Edited by Andreas Sturmlechner

Merge request reports