mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 19:40:54 +00:00
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(
|
||||
not_null<QWidget*> parent) {
|
||||
_window->createWinId();
|
||||
const auto parentScreen = [&] {
|
||||
if (!::Platform::IsWayland()) {
|
||||
if (const auto screen = QGuiApplication::screenAt(
|
||||
@ -585,7 +586,7 @@ void ChooseSourceProcess::setupGeometryWithParent(
|
||||
}();
|
||||
const auto myScreen = _window->screen();
|
||||
if (parentScreen && myScreen != parentScreen) {
|
||||
_window->setScreen(parentScreen);
|
||||
_window->windowHandle()->setScreen(parentScreen);
|
||||
}
|
||||
_window->move(
|
||||
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")
|
||||
.arg(screenList.indexOf(myScreen))
|
||||
.arg(screenList.indexOf(activeWindowScreen)));
|
||||
_widget->setScreen(activeWindowScreen);
|
||||
window()->setScreen(activeWindowScreen);
|
||||
DEBUG_LOG(("Viewer Pos: New actual screen: %1")
|
||||
.arg(screenList.indexOf(_widget->screen())));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user