Skip to content

Commit 177fa1f

Browse files
committed
fix: improve menu interaction and notification center handling
1. Add keyboard grab when showing panel menus to ensure proper input focus 2. Release keyboard grab when closing menus to prevent input conflicts 3. Close notification center panel when opening various dock menus (dock menu, app context menu, tray popups) to avoid overlapping UI elements 4. Add focus handling for tray item popups to ensure proper keyboard navigation 5. Update copyright years for consistency Log: Fixed menu interactions by ensuring proper focus management and preventing overlapping with notification center Influence: 1. Test opening dock menu while notification center is open - notification center should close 2. Verify app context menus close notification center when opened 3. Check tray popups properly close notification center 4. Test keyboard navigation in all menu types 5. Verify input focus is correctly managed between menus and other UI elements 6. Test menu interactions with multiple open applications PMS: BUG-284867
1 parent b87de4e commit 177fa1f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

frame/qml/PanelMenu.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Item {
6262
menuWindow.title = windowTitle
6363
menuWindow.show()
6464
DS.grabMouse(menuWindow)
65+
DS.grabKeyboard(menuWindow)
6566
})
6667
}
6768

@@ -75,6 +76,7 @@ Item {
7576

7677
menuWindow.close()
7778
menuWindow.currentItem = null
79+
DS.grabKeyboard(menuWindow, false)
7880
}
7981

8082
Connections {

panels/dock/tray/TrayItemSurfacePopup.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: GPL-3.0-or-later
44

@@ -162,6 +162,7 @@ Item {
162162
return Qt.rect(point.x, point.y, popupMenu.width, popupMenu.height)
163163
})
164164
popupMenu.open()
165+
popupMenuContent.takeFocus()
165166
}
166167
}
167168
}

0 commit comments

Comments
 (0)