From 75da8155468b5407ff53b705d2cc8d3de657f131 Mon Sep 17 00:00:00 2001 From: yangmin100 Date: Fri, 15 Nov 2024 16:52:31 +0800 Subject: [PATCH] fix:auth window could'n show --- polkit-agent/src/fullscreenbackground.cpp | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/polkit-agent/src/fullscreenbackground.cpp b/polkit-agent/src/fullscreenbackground.cpp index 9bbaa3d..40bb5b8 100644 --- a/polkit-agent/src/fullscreenbackground.cpp +++ b/polkit-agent/src/fullscreenbackground.cpp @@ -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());