fix:auth window could'n show
This commit is contained in:
parent
3363113272
commit
6d82cd8c13
|
@ -338,27 +338,27 @@ void FullScreenBackground::moveToScreen(QScreen *screen)
|
|||
void FullScreenBackground::moveToCursorScreen()
|
||||
{
|
||||
bool isFoundScreen = false;
|
||||
if (m_isWayland) {
|
||||
QString strCurScreen = WindowManager::currentOutputName();
|
||||
for (auto screen : QApplication::screens()) {
|
||||
qDebug() << "Screen:" << screen->name() << "," << screen->geometry();
|
||||
if (screen && screen->name() == strCurScreen) {
|
||||
isFoundScreen = true;
|
||||
moveToScreen(screen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QPoint cursor = QCursor::pos();
|
||||
for (auto screen : QApplication::screens()) {
|
||||
qDebug() << "Screen:" << screen->name() << "," << screen->geometry();
|
||||
if (screen && screen->geometry().contains(cursor)) {
|
||||
isFoundScreen = true;
|
||||
moveToScreen(screen);
|
||||
break;
|
||||
}
|
||||
// if (m_isWayland) {
|
||||
// QString strCurScreen = WindowManager::currentOutputName();
|
||||
// for (auto screen : QApplication::screens()) {
|
||||
// qDebug() << "Screen:" << screen->name() << "," << screen->geometry();
|
||||
// if (screen && screen->name() == strCurScreen) {
|
||||
// isFoundScreen = true;
|
||||
// moveToScreen(screen);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
QPoint cursor = QCursor::pos();
|
||||
for (auto screen : QApplication::screens()) {
|
||||
qDebug() << "Screen:" << screen->name() << "," << screen->geometry();
|
||||
if (screen && screen->geometry().contains(cursor)) {
|
||||
isFoundScreen = true;
|
||||
moveToScreen(screen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// }
|
||||
if (!isFoundScreen) {
|
||||
if (QApplication::primaryScreen()) {
|
||||
moveToScreen(QApplication::primaryScreen());
|
||||
|
|
Loading…
Reference in New Issue