fix build on unix platforms

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-03-11 09:22:44 +08:00
parent affba58e25
commit 3b171b3ea9
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,7 @@ void FramelessWindowsManager::addWindow(QWindow *window)
// If you encounter with any issues when do the painting through OpenGL, // If you encounter with any issues when do the painting through OpenGL,
// just comment out the following two lines, they are here to workaround // just comment out the following two lines, they are here to workaround
// some strange Windows bugs but to be honest they don't have much to do // some strange Windows bugs but to be honest they don't have much to do
// with our custom window frame handling. // with our custom window frame handling functionality.
if (!QCoreApplication::testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)) { if (!QCoreApplication::testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)) {
QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
} }
@ -58,6 +58,7 @@ void FramelessWindowsManager::addWindow(QWindow *window)
framelessHelperUnix()->removeWindowFrame(window); framelessHelperUnix()->removeWindowFrame(window);
#else #else
FramelessHelperWin::addFramelessWindow(window); FramelessHelperWin::addFramelessWindow(window);
#ifdef Q_OS_WIN
// Work-around Win32 multi-monitor artifacts. // Work-around Win32 multi-monitor artifacts.
QObject::connect(window, &QWindow::screenChanged, window, [window](QScreen *screen){ QObject::connect(window, &QWindow::screenChanged, window, [window](QScreen *screen){
Q_UNUSED(screen); Q_UNUSED(screen);
@ -71,6 +72,7 @@ void FramelessWindowsManager::addWindow(QWindow *window)
Utilities::triggerFrameChange(window->winId()); Utilities::triggerFrameChange(window->winId());
}); });
#endif #endif
#endif
} }
void FramelessWindowsManager::setHitTestVisible(QWindow *window, QObject *object, const bool value) void FramelessWindowsManager::setHitTestVisible(QWindow *window, QObject *object, const bool value)