Skip invisible objects
Fixes: #40 Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
7522273331
commit
310b44b8c4
|
@ -177,6 +177,10 @@ bool FramelessHelper::eventFilter(QObject *object, QEvent *event)
|
|||
qWarning() << obj << "is not a QWidget or QQuickItem!";
|
||||
continue;
|
||||
}
|
||||
if (!obj->property("visible").toBool()) {
|
||||
qDebug() << "Skipping invisible object" << obj;
|
||||
continue;
|
||||
}
|
||||
const auto mapOriginPointToWindow = [](const QObject *obj) -> QPointF {
|
||||
Q_ASSERT(obj);
|
||||
QPointF point = {obj->property("x").toReal(), obj->property("y").toReal()};
|
||||
|
|
|
@ -1301,6 +1301,10 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType,
|
|||
qWarning() << object << "is not a QWidget or QQuickItem!";
|
||||
continue;
|
||||
}
|
||||
if (!object->property("visible").toBool()) {
|
||||
qDebug() << "Skipping invisible object" << object;
|
||||
continue;
|
||||
}
|
||||
const auto mapOriginPointToWindow = [](const QObject *obj) -> QPointF {
|
||||
Q_ASSERT(obj);
|
||||
QPointF point = {obj->property("x").toReal(), obj->property("y").toReal()};
|
||||
|
|
Loading…
Reference in New Issue