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