forked from github_mirror/framelesshelper
Fix old Qt build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
74607b2e45
commit
987a8397dc
|
@ -38,6 +38,8 @@
|
|||
Q_GLOBAL_STATIC(FramelessHelper, framelessHelper)
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(const QObject *)
|
||||
|
||||
FramelessWindowsManager::FramelessWindowsManager() = default;
|
||||
|
||||
void FramelessWindowsManager::addWindow(QWindow *window)
|
||||
|
|
|
@ -24,8 +24,11 @@
|
|||
|
||||
#include "utilities.h"
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtGui/qguiapplication.h>
|
||||
|
||||
Q_DECLARE_METATYPE(const QObject *)
|
||||
|
||||
QWindow *Utilities::findWindow(const WId winId)
|
||||
{
|
||||
Q_ASSERT(winId);
|
||||
|
@ -83,9 +86,8 @@ bool Utilities::isHitTestVisibleInChrome(const QWindow *window)
|
|||
if (!window) {
|
||||
return false;
|
||||
}
|
||||
QObjectList objs = {};
|
||||
const auto target = qvariant_cast<const QObject *>(window->property(_flh_global::_flh_nativeParent_flag));
|
||||
objs = target ? target->findChildren<QObject *>() : window->findChildren<QObject *>();
|
||||
const QObjectList objs = target ? target->findChildren<QObject *>() : window->findChildren<QObject *>();
|
||||
if (objs.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue