summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2019-04-15 16:25:49 -0700
committer chaviw <chaviw@google.com> 2019-04-16 14:39:09 -0700
commit4fe368575e19e11aa277e89e10cce139f4773a0e (patch)
treebbfda200553ca63d8297ca8f865a0043b82a56b9
parent27e6f2b579ebca586411ced6106c48b014730160 (diff)
Fix input window commands
There were two fixes here: 1. InputWindowCommands were getting merged from pendingInputWindowCommands. This caused the old commands to continue getting applied. Instead inputWindowCommands gets set to pendingInputWindowCommands. 2. Only set mPendingSyncInputWindows to true if the transaction contains syncInputWindows. This is to prevent setting mPendingSyncInputWindows to false while waiting for a callback from InputDispatcher. Test: WindowInputTests Fixes: 129087315 Change-Id: I8db30820da9580854ba4d02ee419b5766bd7b24a
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 606355549e..6341f7ab1b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2881,7 +2881,7 @@ void SurfaceFlinger::updateInputWindowInfo() {
}
void SurfaceFlinger::commitInputWindowCommands() {
- mInputWindowCommands.merge(mPendingInputWindowCommands);
+ mInputWindowCommands = mPendingInputWindowCommands;
mPendingInputWindowCommands.clear();
}
@@ -3662,8 +3662,9 @@ void SurfaceFlinger::applyTransactionState(const Vector<ComposerState>& states,
if (flags & eAnimation) {
mAnimTransactionPending = true;
}
-
- mPendingSyncInputWindows = mPendingInputWindowCommands.syncInputWindows;
+ if (mPendingInputWindowCommands.syncInputWindows) {
+ mPendingSyncInputWindows = true;
+ }
// applyTransactionState can be called by either the main SF thread or by
// another process through setTransactionState. While a given process may wish