Let Wayland to use QGuiApplication::screenAt (forgotten place)

This commit is contained in:
Ilya Fedin 2024-04-07 13:31:34 +04:00 committed by John Preston
parent 542153d950
commit 3da8351522

View file

@ -587,12 +587,10 @@ void ChooseSourceProcess::setupGeometryWithParent(
not_null<QWidget*> parent) { not_null<QWidget*> parent) {
_window->createWinId(); _window->createWinId();
const auto parentScreen = [&] { const auto parentScreen = [&] {
if (!::Platform::IsWayland()) {
if (const auto screen = QGuiApplication::screenAt( if (const auto screen = QGuiApplication::screenAt(
parent->geometry().center())) { parent->geometry().center())) {
return screen; return screen;
} }
}
return parent->screen(); return parent->screen();
}(); }();
const auto myScreen = _window->screen(); const auto myScreen = _window->screen();