Commit 0884e41a authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Another attempt to fix fullscreen monitor going to wrong display

parent 5c4daf59
Pipeline #88095 passed with stage
in 8 minutes and 42 seconds
......@@ -971,10 +971,9 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
for (auto screen : qApp->screens()) {
if (screen->serialNumber() == KdenliveSettings::fullscreen_monitor()) {
// Match
QRect screenRect = screen->availableGeometry();
m_glWidget->setParent(nullptr);
m_glWidget->move(this->parentWidget()->mapFromGlobal(screenRect.center()));
m_glWidget->setGeometry(screenRect);
m_glWidget->move(screen->geometry().topLeft());
m_glWidget->resize(screen->geometry().size());
screenFound = true;
break;
}
......@@ -983,11 +982,11 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
if (!screenFound) {
for (auto screen : qApp->screens()) {
// Autodetect second monitor
QRect screenRect = screen->availableGeometry();
QRect screenRect = screen->geometry();
if (!screenRect.contains(pCore->window()->geometry().center())) {
m_glWidget->setParent(nullptr);
m_glWidget->move(this->parentWidget()->mapFromGlobal(screenRect.center()));
m_glWidget->setGeometry(screenRect);
m_glWidget->move(screenRect.topLeft());
m_glWidget->resize(screenRect.size());
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment