mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02: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
2 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue