From 7a69bb2fa219ba216b34082c90906d18d1980a7e Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Fri, 19 Feb 2021 19:22:47 +0800 Subject: [PATCH] partially revert 50170eb for the maximize shortcut on Windows Since the workaround actually doesn't work, so we remain the old behavior unchanged. --- app/framelesswindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/framelesswindow.cpp b/app/framelesswindow.cpp index e408594..ee98597 100644 --- a/app/framelesswindow.cpp +++ b/app/framelesswindow.cpp @@ -11,10 +11,11 @@ FramelessWindow::FramelessWindow(QWidget *parent) : QWidget(parent) , m_centralLayout(new QVBoxLayout(this)) { - // A frameless window has the Qt::WindowTitleHint flag seems wrong, - // but it's a workaround of the following bug (also see the focused comment): - // https://bugreports.qt.io/browse/QTBUG-8361?focusedCommentId=542002#comment-542002 - this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint); + // We should use Qt::WindowMinMaxButtonsHint here but there is a bug in Qt + // that will make pressing Meta+Up cause the app fullscreen under Windows, + // so for now we only use the Qt::WindowMinimizeButtonHint flag here. + // https://bugreports.qt.io/browse/QTBUG-91226 + this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint); m_centralLayout->setMargin(0); }