From 6945a197490e7aa0113bca1f9a13019a27b5d8eb Mon Sep 17 00:00:00 2001
From: Joker <joker2387089590@gmail.com>
Date: 周三, 18 6月 2025 23:10:25 +0800
Subject: [PATCH] change submodule url

---
 src/quick/quickwindowagent_win.cpp |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/quick/quickwindowagent_win.cpp b/src/quick/quickwindowagent_win.cpp
index 95bb6f8..712e742 100644
--- a/src/quick/quickwindowagent_win.cpp
+++ b/src/quick/quickwindowagent_win.cpp
@@ -47,7 +47,11 @@
 
     bool BorderItem::shouldEnableEmulatedPainter() const {
 #  if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
-        auto api = window()->rendererInterface()->graphicsApi();
+        const QQuickWindow* win = window();
+        if (!win) {
+            return true;
+        }
+        auto api = win->rendererInterface()->graphicsApi();
         switch (api) {
             case QSGRendererInterface::OpenGL:
                 // FIXME: experimental, try to find the exact fixed version.
@@ -97,7 +101,11 @@
     BorderItem::~BorderItem() = default;
 
     void BorderItem::updateGeometry() {
-        setHeight(borderThickness() / window()->devicePixelRatio());
+        const QQuickWindow* win = window();
+        if (!win) {
+            return;
+        }
+        setHeight(borderThickness() / win->effectiveDevicePixelRatio());
         setVisible(isNormalWindow());
     }
 

--
Gitblit v1.9.1