Commit 1e2584e5 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix project monitor update when fullscreen.

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