Fix project monitor update when fullscreen.

Fixes #306
parent 55003541
......@@ -811,6 +811,11 @@ void Monitor::setZoom()
}
}
bool Monitor::monitorIsFullScreen() const
{
return m_glWidget->isFullScreen();
}
void Monitor::slotSwitchFullScreen(bool minimizeOnly)
{
// TODO: disable screensaver?
......
......@@ -155,6 +155,8 @@ public:
MonitorProxy *getControllerProxy();
/** @brief Update active track in multitrack view */
void updateMultiTrackView(int tid);
/** @brief Returns true if monitor is currently fullscreen */
bool monitorIsFullScreen() const;
protected:
void mousePressEvent(QMouseEvent *event) override;
......
......@@ -128,7 +128,7 @@ void MonitorManager::forceProjectMonitorRefresh()
bool MonitorManager::projectMonitorVisible() const
{
return (m_projectMonitor->isVisible() && !m_projectMonitor->visibleRegion().isEmpty());
return (m_projectMonitor->monitorIsFullScreen() || (m_projectMonitor->isVisible() && !m_projectMonitor->visibleRegion().isEmpty()));
}
bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
......@@ -149,12 +149,17 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
}
}
if (m_activeMonitor) {
m_activeMonitor->parentWidget()->raise();
if (name == Kdenlive::ClipMonitor) {
if (!m_clipMonitor->monitorIsFullScreen()) {
m_clipMonitor->parentWidget()->raise();
}
emit updateOverlayInfos(name, KdenliveSettings::displayClipMonitorInfo());
m_projectMonitor->displayAudioMonitor(false);
m_clipMonitor->displayAudioMonitor(true);
} else if (name == Kdenlive::ProjectMonitor) {
if (!m_projectMonitor->monitorIsFullScreen()) {
m_projectMonitor->parentWidget()->raise();
}
emit updateOverlayInfos(name, KdenliveSettings::displayProjectMonitorInfo());
m_clipMonitor->displayAudioMonitor(false);
m_projectMonitor->displayAudioMonitor(true);
......
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