summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorge Gil <jorgegil@google.com> 2023-03-16 23:35:25 +0000
committer Jorge Gil <jorgegil@google.com> 2023-03-21 00:14:58 +0000
commitcc5d297caef47a7f91907d55a53f0257f8eba61b (patch)
tree88884c22ef2d39204dfa152a45f62f23a30ea7ff
parentd5e48ae2362e02c2bf4ceee7719072edc3cbe3ab (diff)
Always close the handle menu if the window loses focus
Bug: 271487478 Test: with two freeform tasks open, open the handle menu on the focused one, then bring the other one to front, and make sure the handle menu is closed on the original window Change-Id: I3460e27e6523ebde1c400f4b9ad63387ed36bb1a
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
index 01187ed94de5..43605e30b813 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
@@ -190,6 +190,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
}
mWindowDecorViewHolder.bindData(mTaskInfo);
+ if (!mTaskInfo.isFocused) {
+ closeHandleMenu();
+ }
+
if (!isDragResizeable) {
closeDragResizeListener();
return;