fix:auth window could'n show
This commit is contained in:
parent
3363113272
commit
6d82cd8c13
|
@ -338,17 +338,17 @@ 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 {
|
||||
// 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();
|
||||
|
@ -358,7 +358,7 @@ void FullScreenBackground::moveToCursorScreen()
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
if (!isFoundScreen) {
|
||||
if (QApplication::primaryScreen()) {
|
||||
moveToScreen(QApplication::primaryScreen());
|
||||
|
|
Loading…
Reference in New Issue