[vlc-commits] qml: use the top window to filter global key events rather than the embed widget

Pierre Lamot git at videolan.org
Tue May 19 16:52:44 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Mar 24 09:52:50 2020 +0100| [b96eb9f3a96e450d65ac8589d5109bbed9e3e4e6] | committer: Pierre Lamot

qml: use the top window to filter global key events rather than the embed widget

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b96eb9f3a96e450d65ac8589d5109bbed9e3e4e6
---

 modules/gui/qt/maininterface/main_interface.cpp | 2 +-
 modules/gui/qt/player/qml/Player.qml            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/maininterface/main_interface.cpp b/modules/gui/qt/maininterface/main_interface.cpp
index 5a830c6e7e..50fc7b963e 100644
--- a/modules/gui/qt/maininterface/main_interface.cpp
+++ b/modules/gui/qt/maininterface/main_interface.cpp
@@ -419,7 +419,7 @@ void MainInterface::createMainWidget( QSettings * )
     rootCtx->setContextProperty( "player", p_intf->p_sys->p_mainPlayerController );
     rootCtx->setContextProperty( "i18n", i18n );
     rootCtx->setContextProperty( "mainctx", mainCtx);
-    rootCtx->setContextProperty( "rootQMLView", mediacenterView);
+    rootCtx->setContextProperty( "topWindow", this->windowHandle());
     rootCtx->setContextProperty( "mainInterface", this);
     rootCtx->setContextProperty( "dialogProvider", DialogsProvider::getInstance());
     rootCtx->setContextProperty( "recentsMedias",  new VLCRecentMediaModel( p_intf, this ));
diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index 6e094a1f60..c6cead1215 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -422,7 +422,7 @@ Widgets.NavigableFocusScope {
     //visible when user navigates within the control bar
     EventFilter {
         id: filter
-        source: rootQMLView
+        source: topWindow
         filterEnabled: controlBarView.state === "visible"
                        && (controlBarView.focus || topcontrolView.focus)
         Keys.onPressed: toolbarAutoHide.setVisible(5000)



More information about the vlc-commits mailing list