Skip to content

Commit b95944c

Browse files
Wenhui YangAndroid (Google) Code Review
authored andcommitted
Merge "Update visibleForInput to make gesture monitor visible in input list" into main
2 parents bb68e3d + ff95c61 commit b95944c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ void updateVisibility(LayerSnapshot& snapshot, bool visible) {
262262
snapshot.isVisible = visible;
263263

264264
if (FlagManager::getInstance().skip_invisible_windows_in_input()) {
265-
snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE, !visible);
265+
const bool visibleForInput =
266+
snapshot.isVisible || (snapshot.hasInputInfo() && !snapshot.isHiddenByPolicy());
267+
snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE,
268+
!visibleForInput);
266269
} else {
267270
// TODO(b/238781169) we are ignoring this compat for now, since we will have
268271
// to remove any optimization based on visibility.

0 commit comments

Comments
 (0)