SF: Lock access to InputWindowCommands

Fixes regression caused by ag/6260282.
Create a pending list of InputWindowCommands so that we can apply the commands without
holding on to the mStateLock to better align with the current and drawing state locking
strategy.

Bug: 124061013
Test: go/wm-smoke
Change-Id: I9ccec72da0d2139ca546e34df8e62c58c178d292
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 46b9128..bf2a03d 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -383,6 +383,7 @@
     other.mListenerCallbacks.clear();
 
     mInputWindowCommands.merge(other.mInputWindowCommands);
+    other.mInputWindowCommands.clear();
 
     return *this;
 }