Fix cursor event would be dropped
Pass the create flag when generate SurfaceControl so the cursor window
flag can also pass to the wrapper surface.
Bug: 177444069
Test: connect mouse and move cursor.
Change-Id: I469bd5b551911d2adccefd1d2fe863deb1997268
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 9b2e10b..5dc2907 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -1796,7 +1796,8 @@
}
ALOGE_IF(err, "SurfaceComposerClient::createSurface error %s", strerror(-err));
if (err == NO_ERROR) {
- *outSurface = new SurfaceControl(this, handle, gbp, id, w, h, format, transformHint);
+ *outSurface =
+ new SurfaceControl(this, handle, gbp, id, w, h, format, transformHint, flags);
}
}
return err;