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

This commit is contained in:
youdiansaodongxi 2024-07-24 16:05:45 +08:00 committed by iaom
parent a89870bdce
commit e6eba046fb
1 changed files with 1 additions and 8 deletions

View File

@ -483,14 +483,7 @@ void MenuWindow::activeMenuWindow(bool active)
} }
if (active) { if (active) {
QScreen* currrentScreen = nullptr; this->setScreen(UkuiQuick::WindowProxy::currentScreen());
for (const auto& screen : QGuiApplication::screens()) {
if (screen->geometry().contains(QCursor::pos())) {
currrentScreen = screen;
break;
}
}
this->setScreen(currrentScreen ? currrentScreen : QGuiApplication::primaryScreen());
updateGeometry(); updateGeometry();
} }