diff --git a/104-playback-bar.patch b/104-playback-bar.patch new file mode 100644 index 0000000..7332809 --- /dev/null +++ b/104-playback-bar.patch @@ -0,0 +1,70 @@ +diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp +index 0bbb07942ae6b3f0c8491ce1fd807e3ebf5d3db5..382be37dccd0fc9dcf9b395b906676657b58e28e 100644 +--- a/modules/gui/qt/components/controller.cpp ++++ b/modules/gui/qt/components/controller.cpp +@@ -858,10 +858,17 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi + isWideFSC = getSettings()->value( "FullScreen/wide" ).toBool(); + + CONNECT( this, fullscreenChanged( bool ), THEMIM, changeFullscreen( bool ) ); ++ ++ Q_ASSERT( _parent ); ++ _parent->installEventFilter( this ); + } + + FullscreenControllerWidget::~FullscreenControllerWidget() + { ++ QWidget *wParent = parentWidget(); ++ Q_ASSERT( wParent ); ++ wParent->removeEventFilter( this ); ++ + getSettings()->setValue( "FullScreen/pos", previousPosition ); + getSettings()->setValue( "FullScreen/screen", screenRes ); + getSettings()->setValue( "FullScreen/wide", isWideFSC ); +@@ -1074,6 +1081,21 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) + } + } + ++bool FullscreenControllerWidget::eventFilter( QObject *watched, QEvent *event ) ++{ ++ const QWidget *wParent = parentWidget(); ++ Q_ASSERT( wParent ); ++ ++ if ( watched == wParent && event->type() == QEvent::ActivationChange ) ++ { ++ /* Hide if not active */ ++ if ( !wParent->isActiveWindow() ) ++ hideFSC(); ++ } ++ ++ return AbstractController::eventFilter( watched, event ); ++} ++ + /** + * On mouse move + * moving with FSC +@@ -1281,6 +1303,12 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout, + */ + void FullscreenControllerWidget::mouseChanged( vout_thread_t *, int i_mousex, int i_mousey ) + { ++ const QWidget *wParent = parentWidget(); ++ Q_ASSERT( wParent ); ++ ++ /* Ignore mouse events if not active */ ++ if ( !wParent->isActiveWindow() ) return; ++ + bool b_toShow; + + /* FIXME - multiple vout (ie multiple mouse position ?) and thread safety if multiple vout ? */ +diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp +index dc8bacce688ba82f47448f6e2892d0c701b726f1..ab7b29f194a52ae7369eba02801f7be020c17ec4 100644 +--- a/modules/gui/qt/components/controller.hpp ++++ b/modules/gui/qt/components/controller.hpp +@@ -283,6 +283,8 @@ protected: + + void customEvent( QEvent *event ) Q_DECL_OVERRIDE; + ++ bool eventFilter( QObject *watched, QEvent *event ) Q_DECL_OVERRIDE; ++ + private slots: + void showFSC(); + void planHideFSC(); diff --git a/vlc.changes b/vlc.changes index 9068f2f..74ffeb1 100644 --- a/vlc.changes +++ b/vlc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 24 21:42:37 UTC 2023 - Eugene Popov + +- Add 104-playback-bar.patch: Backport fix for the playback bar (commit 60771fe7) + ------------------------------------------------------------------- Mon Dec 12 11:00:12 UTC 2022 - Hans-Peter Jansen diff --git a/vlc.spec b/vlc.spec index 7923601..fde4c52 100644 --- a/vlc.spec +++ b/vlc.spec @@ -57,6 +57,7 @@ Patch5: vlc-libplacebo-5.patch Patch100: vlc-projectM-qt5.patch # PATCH-FIX-UPSTREAM -- Use OpenCV C++ API Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch +Patch104: 104-playback-bar.patch BuildRequires: Mesa-devel BuildRequires: aalib-devel BuildRequires: alsa-devel >= 1.0.24 @@ -407,6 +408,7 @@ OpenCV based video filters and a face detection example. %patch100 -p1 %endif %patch103 -p1 +%patch104 -p1 # a52_init() < 0.8.0 doesn't take any arguments if pkg-config --max-version 0.8 liba52; then