Commit abf6f895 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Fix monitor fullscreen in some cases and don't lose focus (broke shortcuts)

parent 6007d573
Pipeline #14624 passed with stage
in 19 minutes and 32 seconds
......@@ -811,10 +811,11 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
// Move monitor widget to the second screen (one screen for Kdenlive, the other one for the Monitor widget)
if (qApp->screens().count() > 1) {
for (auto screen : qApp->screens()) {
if (screen != qApp->screenAt(pCore->window()->geometry().center())) {
QRect rect = screen->availableGeometry();
QRect screenRect = screen->availableGeometry();
if (!screenRect.contains(pCore->window()->geometry().center())) {
m_glWidget->setParent(nullptr);
m_glWidget->move(this->parentWidget()->mapFromGlobal(rect.center()));
m_glWidget->move(this->parentWidget()->mapFromGlobal(screenRect.center()));
m_glWidget->setGeometry(screenRect);
break;
}
}
......@@ -822,6 +823,7 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
m_glWidget->setParent(nullptr);
}
m_glWidget->showFullScreen();
qApp->activeWindow()->setFocus();
} else {
m_glWidget->showNormal();
auto *lay = (QVBoxLayout *)layout();
......
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