Fix cursor with custom titlebar on Linux

This commit is contained in:
Ilya Fedin 2021-07-26 02:56:40 +04:00 committed by John Preston
parent 17123c08ab
commit 95cafc5064

View file

@ -282,7 +282,7 @@ bool DefaultWindowHelper::eventFilter(QObject *obj, QEvent *e) {
// doesn't work with RpWidget::events() for some reason
if (e->type() == QEvent::MouseMove
&& obj->isWidgetType()
&& static_cast<QWidget*>(window()) == static_cast<QWidget*>(obj)) {
&& window()->isAncestorOf(static_cast<QWidget*>(obj))) {
const auto mouseEvent = static_cast<QMouseEvent*>(e);
const auto currentPoint = mouseEvent->windowPos().toPoint();
const auto edges = edgesFromPos(currentPoint);