mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-25 10:01:00 +00:00
Fix getting the screen of viewer/pip
We need to workaround getting the actual screen for the parent by getting its position yet we need to get the setted screen for the widget itself as that's the screen used to compute the geometry
This commit is contained in:
parent
fde63ccb21
commit
eb1ef6d2a7
@ -817,7 +817,7 @@ void OverlayWidget::moveToScreen(bool inMove) {
|
||||
? Core::App().activeWindow()->widget().get()
|
||||
: nullptr;
|
||||
const auto activeWindowScreen = widgetScreen(applicationWindow);
|
||||
const auto myScreen = widgetScreen(_window);
|
||||
const auto myScreen = _window->screen();
|
||||
if (activeWindowScreen && myScreen != activeWindowScreen) {
|
||||
const auto screenList = QGuiApplication::screens();
|
||||
DEBUG_LOG(("Viewer Pos: Currently on screen %1, moving to screen %2")
|
||||
|
@ -514,8 +514,8 @@ void PipPanel::setPositionDefault() {
|
||||
return widget->screen();
|
||||
};
|
||||
const auto parentScreen = widgetScreen(_parent);
|
||||
const auto myScreen = widgetScreen(widget());
|
||||
if (parentScreen && myScreen && myScreen != parentScreen) {
|
||||
const auto myScreen = widget()->screen();
|
||||
if (parentScreen && myScreen != parentScreen) {
|
||||
widget()->windowHandle()->setScreen(parentScreen);
|
||||
}
|
||||
auto position = Position();
|
||||
|
Loading…
Reference in New Issue
Block a user