From 07410beab594192993b3c1be3fb7dc5689061be5 Mon Sep 17 00:00:00 2001 From: hewenfei Date: Sat, 6 May 2023 17:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AA=97=E5=8F=A3=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/windows/menu-main-window.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/windows/menu-main-window.cpp b/src/windows/menu-main-window.cpp index abf5102..c292e6f 100644 --- a/src/windows/menu-main-window.cpp +++ b/src/windows/menu-main-window.cpp @@ -395,7 +395,7 @@ void MenuWindow::init() setColor("transparent"); // setFlags(Qt::FramelessWindowHint); - setFlag(Qt::WindowStaysOnTopHint); + setFlags(Qt::Window | Qt::WindowStaysOnTopHint); WindowHelper::setWindowAttribute(this); WindowHelper::removeHeaderBar(this); WindowHelper::windowBlur(this, true); @@ -429,6 +429,12 @@ void MenuWindow::updateGeometry() return; } + if (m_isFullScreen) { + setMaximumSize(rect.size()); + } else { + setMinimumSize(rect.size()); + } + WindowHelper::setWindowGeometry(this, rect); setMinimumSize(geometry().size()); setMaximumSize(geometry().size()); @@ -486,7 +492,13 @@ void MenuWindow::enableWindowBlur(bool enable) void MenuWindow::exposeEvent(QExposeEvent *event) { if (isExposed()) { - requestActivate(); + if (QX11Info::isPlatformX11()) { + requestActivate(); + } else { + WindowHelper::setWindowAttribute(this); +// WindowHelper::removeHeaderBar(this); + updateGeometry(); + } } QQuickView::exposeEvent(event); }