Make Taskbar focusable when a popup is open.

- Added ArrowPopup#OnPopupClosedCallback to automatically remove Taskbar focus when the popup closes.

Fixes: 209917078
Test: opened popup in taskbar and closed it with switch access, touching anywhere on the screen and using the back gesture. went home to check if focus was removed.
Change-Id: Ie7aafc9cf0f03fadaa44e77818508e9e1d8db610
This commit is contained in:
Schneider Victor-tulias
2022-01-12 14:33:43 -08:00
parent 66971f87e1
commit 291d88460b
4 changed files with 34 additions and 8 deletions

View File

@@ -154,6 +154,15 @@ public class TaskbarPopupController {
.filter(Objects::nonNull)
.collect(Collectors.toList()));
container.requestFocus();
// Make focusable to receive back events
mControllers.taskbarActivityContext.setTaskbarWindowFocusable(true);
container.setOnCloseCallback(() -> {
mControllers.taskbarActivityContext.getDragLayer().post(
() -> mControllers.taskbarActivityContext.setTaskbarWindowFocusable(false));
container.setOnCloseCallback(null);
});
return container;
}