Update FFmpeg handling and focus management

Refactor FFmpeg frame processing and improve focus management in panels. Add memory sanitization for debug builds and update KDDockWidgets integration.
This commit is contained in:
2025-11-23 16:35:09 +08:00
parent 2ea53667c0
commit 1e33a31b73
15 changed files with 75 additions and 27 deletions
+6 -4
View File
@@ -29,15 +29,17 @@
#include <QOffscreenSurface>
#endif
#include "KDDockWidgets/src/qtwidgets/Window_p.h"
#include "dialog/about/about.h"
#include "mainmenu.h"
#include "mainstatusbar.h"
#include "KDDockWidgets/src/LayoutSaver.h"
#include "timeline/timelineundoworkarea.h"
namespace olive
{
#define super KDDockWidgets::MainWindow
#define super KDDockWidgets::QtWidgets::MainWindow
MainWindow::MainWindow(QWidget *parent)
: super(QStringLiteral("OliveMain"), KDDockWidgets::MainWindowOption_None,
@@ -95,7 +97,7 @@ MainWindow::MainWindow(QWidget *parent)
// emit the "shown" signal before emitting the "hidden" signals, resulting
// in Core thinking there are -1 pixel samplers open. To mitigate that,
// we force "shown" to emit ourselves here.
emit pixel_sampler_panel_->shown();
emit pixel_sampler_panel_->shown(Qt::OtherFocusReason);
// Make node-related connections
connect(node_panel_, &NodePanel::NodeSelectionChangedWithContexts,
@@ -382,7 +384,7 @@ void MainWindow::ToggleMaximizedPanel()
premaximized_state_.clear();
currently_focused_panel->raise();
currently_focused_panel->setFocus();
currently_focused_panel->setFocus(Qt::ActiveWindowFocusReason);
PanelManager::instance()->SetSuppressChangedSignal(false);
}
@@ -430,7 +432,7 @@ void MainWindow::SetProject(Project *p)
project_panel_->set_project(p);
if (project_) {
project_panel_->setFocus();
project_panel_->setFocus(Qt::OtherFocusReason);
}
}