From 967e741b1696b2d43f9a742f4489be955cd97b92 Mon Sep 17 00:00:00 2001
From: SineStriker <55847490+SineStriker@users.noreply.github.com>
Date: 周一, 24 2月 2025 02:59:04 +0800
Subject: [PATCH] Update

---
 src/core/contexts/qtwindowcontext.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/core/contexts/qtwindowcontext.cpp b/src/core/contexts/qtwindowcontext.cpp
index a72bce0..a476211 100644
--- a/src/core/contexts/qtwindowcontext.cpp
+++ b/src/core/contexts/qtwindowcontext.cpp
@@ -121,7 +121,7 @@
         auto window = m_context->window();
         auto delegate = m_context->delegate();
         auto me = static_cast<const QMouseEvent *>(event);
-        bool fixedSize = delegate->isHostSizeFixed(host);
+        bool fixedSize = m_context->isHostSizeFixed();
 
         QPoint scenePos = getMouseEventScenePos(me);
         QPoint globalPos = getMouseEventGlobalPos(me);
@@ -219,8 +219,10 @@
 
             case QEvent::MouseButtonDblClick: {
                 if (me->button() == Qt::LeftButton && inTitleBar && !fixedSize) {
+                    Qt::WindowFlags windowFlags = delegate->getWindowFlags(host);
                     Qt::WindowStates windowState = delegate->getWindowState(host);
-                    if (!(windowState & Qt::WindowFullScreen)) {
+                    if ((windowFlags & Qt::WindowMaximizeButtonHint) &&
+                        !(windowState & Qt::WindowFullScreen)) {
                         if (windowState & Qt::WindowMaximized) {
                             delegate->setWindowState(host, windowState & ~Qt::WindowMaximized);
                         } else {

--
Gitblit v1.9.1