fix(src/windows): 修改判断鼠标所在屏幕接口
This commit is contained in:
parent
a89870bdce
commit
e6eba046fb
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue