mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
dankbar: Fix widget context focus w/Autohide enabled
This commit is contained in:
@@ -111,10 +111,18 @@ BasePill {
|
||||
edge = barEdge ?? "top";
|
||||
|
||||
visible = true;
|
||||
|
||||
if (contextMenuWindow.screen) {
|
||||
TrayMenuManager.registerMenu(contextMenuWindow.screen.name, contextMenuWindow);
|
||||
}
|
||||
}
|
||||
|
||||
function closeMenu() {
|
||||
visible = false;
|
||||
|
||||
if (contextMenuWindow.screen) {
|
||||
TrayMenuManager.unregisterMenu(contextMenuWindow.screen.name);
|
||||
}
|
||||
}
|
||||
|
||||
screen: null
|
||||
@@ -130,6 +138,19 @@ BasePill {
|
||||
bottom: true
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (contextMenuWindow.screen) {
|
||||
TrayMenuManager.unregisterMenu(contextMenuWindow.screen.name);
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: PopoutManager
|
||||
function onPopoutOpening() {
|
||||
contextMenuWindow.closeMenu();
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
|
||||
Reference in New Issue
Block a user