Client: Don't restore content cursor when on the window decorations
Problem: When the cursor entered the window decorations, QWaylandWindow::restoreMouseCursor would be called from the pointer enter handler messing up the cursor from the decorations, making the resize border seemingly hard to hit. Don't restore the cursor unless inside the window contents. [ChangeLog][QPA plugin] Fixed a bug where the arrow cursor would be shown instead of the resize cursor when hovering over the window decoration border. Change-Id: I2fabd8d626deaa7006734a4d5c6d10d6c0114466 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
14beea787a
commit
7e5daff5dd
@ -804,8 +804,13 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan
|
||||
}
|
||||
|
||||
#if QT_CONFIG(cursor)
|
||||
if (e.type == QWaylandPointerEvent::Enter)
|
||||
restoreMouseCursor(inputDevice);
|
||||
if (e.type == QWaylandPointerEvent::Enter) {
|
||||
QRect windowGeometry = window()->frameGeometry();
|
||||
windowGeometry.moveTopLeft({0, 0}); // convert to wayland surface coordinates
|
||||
QRect contentGeometry = windowGeometry.marginsRemoved(frameMargins());
|
||||
if (contentGeometry.contains(e.local.toPoint()))
|
||||
restoreMouseCursor(inputDevice);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user