Commit d2e86325 authored by Prince Gupta's avatar Prince Gupta Committed by Jean-Baptiste Kempf
Browse files

qml: lock player UI when global menu is shown

fixes #25589
parent f048aefb
...@@ -70,6 +70,9 @@ void QmlGlobalMenu::popup(QPoint pos) ...@@ -70,6 +70,9 @@ void QmlGlobalMenu::popup(QPoint pos)
m_menu = new QMenu(); m_menu = new QMenu();
QMenu* submenu; QMenu* submenu;
connect( m_menu, &QMenu::aboutToShow, this, &QmlGlobalMenu::aboutToShow );
connect( m_menu, &QMenu::aboutToHide, this, &QmlGlobalMenu::aboutToHide );
submenu = m_menu->addMenu(qtr( "&Media" )); submenu = m_menu->addMenu(qtr( "&Media" ));
FileMenu( p_intf, submenu, p_intf->p_sys->p_mi ); FileMenu( p_intf, submenu, p_intf->p_sys->p_mi );
......
...@@ -63,6 +63,10 @@ public: ...@@ -63,6 +63,10 @@ public:
explicit QmlGlobalMenu(QObject *parent = nullptr); explicit QmlGlobalMenu(QObject *parent = nullptr);
~QmlGlobalMenu(); ~QmlGlobalMenu();
signals:
void aboutToShow();
void aboutToHide();
public slots: public slots:
void popup( QPoint pos ); void popup( QPoint pos );
private: private:
......
...@@ -502,7 +502,11 @@ Item{ ...@@ -502,7 +502,11 @@ Item{
QmlGlobalMenu { QmlGlobalMenu {
id: contextMenu id: contextMenu
ctx: mainctx ctx: mainctx
onAboutToShow: controlButtons.requestLockUnlockAutoHide(true, contextMenu)
onAboutToHide: controlButtons.requestLockUnlockAutoHide(false, contextMenu)
} }
} }
} }
......
...@@ -262,7 +262,11 @@ Widgets.NavigableFocusScope{ ...@@ -262,7 +262,11 @@ Widgets.NavigableFocusScope{
QmlGlobalMenu { QmlGlobalMenu {
id: contextMenu id: contextMenu
ctx: mainctx ctx: mainctx
onAboutToShow: topFocusScope.requestLockUnlockAutoHide(true, contextMenu)
onAboutToHide: topFocusScope.requestLockUnlockAutoHide(false, contextMenu)
} }
} }
......
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