Commit 7d834a86 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix detection of secondary screen for monitor fullscreen.

Related to #!67
parent a0e6a34f
...@@ -777,10 +777,10 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly) ...@@ -777,10 +777,10 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
// Move monitor widget to the second screen (one screen for Kdenlive, the other one for the Monitor widget) // Move monitor widget to the second screen (one screen for Kdenlive, the other one for the Monitor widget)
if (qApp->screens().count() > 1) { if (qApp->screens().count() > 1) {
for (auto screen : qApp->screens()) { for (auto screen : qApp->screens()) {
if (screen != qApp->screenAt(this->parentWidget()->mapToGlobal(QPoint()))) { if (screen != qApp->screenAt(pCore->window()->geometry().center())) {
QRect rect = screen->availableGeometry(); QRect rect = screen->availableGeometry();
m_videoWidget->setParent(nullptr); m_videoWidget->setParent(nullptr);
m_videoWidget->move(this->parentWidget()->mapFromGlobal(rect.topLeft())); m_videoWidget->move(this->parentWidget()->mapFromGlobal(rect.center()));
break; break;
} }
} }
......
Supports Markdown
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