From 5fe936f63158e3504e3b2668a2b28131191441fa Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Fri, 13 Nov 2020 09:56:11 +0800 Subject: [PATCH] Minor tweaks. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- examples/QMainWindow/main.cpp | 2 +- examples/QWidget/main.cpp | 2 +- winnativeeventfilter.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/QMainWindow/main.cpp b/examples/QMainWindow/main.cpp index 1616741..362d5b3 100644 --- a/examples/QMainWindow/main.cpp +++ b/examples/QMainWindow/main.cpp @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) mainWindow->resize(800, 600); - FramelessWindowsManager::moveWindowToDesktopCenter(mainWindow); + //FramelessWindowsManager::moveWindowToDesktopCenter(mainWindow); mainWindow->show(); diff --git a/examples/QWidget/main.cpp b/examples/QWidget/main.cpp index 3e97920..d59cfa0 100644 --- a/examples/QWidget/main.cpp +++ b/examples/QWidget/main.cpp @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) widget.resize(800, 600); - FramelessWindowsManager::moveWindowToDesktopCenter(&widget); + //FramelessWindowsManager::moveWindowToDesktopCenter(&widget); widget.show(); diff --git a/winnativeeventfilter.cpp b/winnativeeventfilter.cpp index dda8897..6895205 100644 --- a/winnativeeventfilter.cpp +++ b/winnativeeventfilter.cpp @@ -1138,7 +1138,7 @@ void updateQtFrame_internal(const HWND handle, const bool resetToDefault = false const int tbh = resetToDefault ? 0 : WinNativeEventFilter::getSystemMetric( - handle, WinNativeEventFilter::SystemMetric::TitleBarHeight); + handle, WinNativeEventFilter::SystemMetric::TitleBarHeight, true); #ifdef QT_WIDGETS_LIB const QWidget *widget = QWidget::find(reinterpret_cast(handle)); if (widget && widget->isTopLevel()) {