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:
+15
-3
@@ -27,23 +27,26 @@
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QVariant>
|
||||
#include "Window_p.h"
|
||||
|
||||
#include "panel/panelmanager.h"
|
||||
|
||||
#include <OpenImageIO/hash.h>
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
#define super KDDockWidgets::DockWidget
|
||||
#define super KDDockWidgets::QtWidgets::DockWidget
|
||||
|
||||
PanelWidget::PanelWidget(const QString &object_name)
|
||||
: super(object_name)
|
||||
, border_visible_(false)
|
||||
, signal_instead_of_close_(false)
|
||||
{
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
View<QWidget>::setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
connect(this, &PanelWidget::shown, this,
|
||||
static_cast<void (PanelWidget::*)()>(&PanelWidget::setFocus));
|
||||
reinterpret_cast<void (PanelWidget::*)()>(&PanelWidget::setFocus));
|
||||
|
||||
PanelManager::instance()->RegisterPanel(this);
|
||||
}
|
||||
@@ -125,6 +128,15 @@ void PanelWidget::changeEvent(QEvent *e)
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
Retranslate();
|
||||
}
|
||||
|
||||
if (e->type() == QEvent::WindowStateChange) {
|
||||
if (isVisible() && !isMinimized()) {
|
||||
emit shown(Qt::OtherFocusReason);
|
||||
}
|
||||
else {
|
||||
emit hidden();
|
||||
}
|
||||
}
|
||||
super::changeEvent(e);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user