Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
adapt to latest qtbase changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenx190 committed Oct 31, 2023
1 parent 14dfa52 commit 33a6f0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/framelesshelper_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void FramelessHelperWin::addWindow(const QObject *window)
#if 0
data->callbacks->setWindowFlags(data->callbacks->getWindowFlags() | Qt::FramelessWindowHint);
#else
# if (QT_VERSION < QT_VERSION_CHECK(6, 5, 3))
# if ((QT_VERSION != QT_VERSION_CHECK(6, 5, 3)) && (QT_VERSION != QT_VERSION_CHECK(6, 6, 0)))
// Qt maintains a frame margin internally, we need to update it accordingly
// otherwise we'll get lots of warning messages when we change the window
// geometry, it will also affect the final window geometry because QPA will
Expand Down
2 changes: 1 addition & 1 deletion src/quick/framelessquickhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ void FramelessQuickHelperPrivate::doRepaintAllChildren()
if (!window) {
return;
}
#if (defined(Q_OS_WINDOWS) && (QT_VERSION < QT_VERSION_CHECK(6, 5, 3)))
#if (defined(Q_OS_WINDOWS) && (QT_VERSION != QT_VERSION_CHECK(6, 5, 3)) && (QT_VERSION != QT_VERSION_CHECK(6, 6, 0)))
// Sync the internal window frame margins with the latest DPI, otherwise
// we will get wrong window sizes after the DPI change.
std::ignore = Utils::updateInternalWindowFrameMargins(window, true);
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/framelesswidgetshelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static inline void forceWidgetRepaint(QWidget *widget)
if (!widget) {
return;
}
#if (defined(Q_OS_WINDOWS) && (QT_VERSION < QT_VERSION_CHECK(6, 5, 3)))
#if (defined(Q_OS_WINDOWS) && (QT_VERSION != QT_VERSION_CHECK(6, 5, 3)) && (QT_VERSION != QT_VERSION_CHECK(6, 6, 0)))
// There's some additional things to do for top level windows on Windows.
if (widget->isWindow()) {
// Don't crash if the QWindow instance has not been created yet.
Expand Down

0 comments on commit 33a6f0d

Please sign in to comment.