From e6eba046fb53d92dc95d3e65dee095a39d8ce7b4 Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Wed, 24 Jul 2024 16:05:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(src/windows):=20=E4=BF=AE=E6=94=B9=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=BC=A0=E6=A0=87=E6=89=80=E5=9C=A8=E5=B1=8F=E5=B9=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/windows/menu-main-window.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/windows/menu-main-window.cpp b/src/windows/menu-main-window.cpp index 6eff5c8..27c0286 100644 --- a/src/windows/menu-main-window.cpp +++ b/src/windows/menu-main-window.cpp @@ -483,14 +483,7 @@ void MenuWindow::activeMenuWindow(bool active) } if (active) { - QScreen* currrentScreen = nullptr; - for (const auto& screen : QGuiApplication::screens()) { - if (screen->geometry().contains(QCursor::pos())) { - currrentScreen = screen; - break; - } - } - this->setScreen(currrentScreen ? currrentScreen : QGuiApplication::primaryScreen()); + this->setScreen(UkuiQuick::WindowProxy::currentScreen()); updateGeometry(); }