Partially revert "Use QWidget::screen/QWidget::mask instead of QWindow ones"
This partially reverts commit e5d8a1aa3c
to use QWindow::setScreen.
This commit is contained in:
parent
55285f327a
commit
984094a7ff
|
@ -574,6 +574,7 @@ void ChooseSourceProcess::setupSourcesGeometry() {
|
||||||
|
|
||||||
void ChooseSourceProcess::setupGeometryWithParent(
|
void ChooseSourceProcess::setupGeometryWithParent(
|
||||||
not_null<QWidget*> parent) {
|
not_null<QWidget*> parent) {
|
||||||
|
_window->createWinId();
|
||||||
const auto parentScreen = [&] {
|
const auto parentScreen = [&] {
|
||||||
if (!::Platform::IsWayland()) {
|
if (!::Platform::IsWayland()) {
|
||||||
if (const auto screen = QGuiApplication::screenAt(
|
if (const auto screen = QGuiApplication::screenAt(
|
||||||
|
@ -585,7 +586,7 @@ void ChooseSourceProcess::setupGeometryWithParent(
|
||||||
}();
|
}();
|
||||||
const auto myScreen = _window->screen();
|
const auto myScreen = _window->screen();
|
||||||
if (parentScreen && myScreen != parentScreen) {
|
if (parentScreen && myScreen != parentScreen) {
|
||||||
_window->setScreen(parentScreen);
|
_window->windowHandle()->setScreen(parentScreen);
|
||||||
}
|
}
|
||||||
_window->move(
|
_window->move(
|
||||||
parent->x() + (parent->width() - _window->width()) / 2,
|
parent->x() + (parent->width() - _window->width()) / 2,
|
||||||
|
|
|
@ -501,7 +501,7 @@ void OverlayWidget::moveToScreen(bool inMove) {
|
||||||
DEBUG_LOG(("Viewer Pos: Currently on screen %1, moving to screen %2")
|
DEBUG_LOG(("Viewer Pos: Currently on screen %1, moving to screen %2")
|
||||||
.arg(screenList.indexOf(myScreen))
|
.arg(screenList.indexOf(myScreen))
|
||||||
.arg(screenList.indexOf(activeWindowScreen)));
|
.arg(screenList.indexOf(activeWindowScreen)));
|
||||||
_widget->setScreen(activeWindowScreen);
|
window()->setScreen(activeWindowScreen);
|
||||||
DEBUG_LOG(("Viewer Pos: New actual screen: %1")
|
DEBUG_LOG(("Viewer Pos: New actual screen: %1")
|
||||||
.arg(screenList.indexOf(_widget->screen())));
|
.arg(screenList.indexOf(_widget->screen())));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue