fix(src/windows): 修改判断鼠标所在屏幕接口

This commit is contained in:
youdiansaodongxi 2024-07-24 16:05:45 +08:00
parent 567e6d2e13
commit f0cfd66a82
1 changed files with 1 additions and 8 deletions

View File

@ -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();
}