mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user