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