diff options
| author | 2019-03-12 13:42:49 -0700 | |
|---|---|---|
| committer | 2019-03-12 13:42:49 -0700 | |
| commit | 6fabeece7fd6d858699af99cb118e63b8a81147b (patch) | |
| tree | 7845e03f33627a123ba29506c2349651a9e169fa /libs/input/InputWindow.cpp | |
| parent | 9f166127de7f8673d59783fb7f2f72d57f515251 (diff) | |
Input: Override touchable region bounds with surface bounds 2/2
Take advantage of the surface flinger layer hierarchy to set touchable
region.
- Let a client set a surface touchable region to its own bounds.
- Let a client set a surface touchable region to another surface bounds.
- Let a client bound its touchable region to a surface.
Test: go/wm-smoke
Test: existing tests
Change-Id: I447c93353d067a296007ba8f8341d2420b941d71
Diffstat (limited to 'libs/input/InputWindow.cpp')
| -rw-r--r-- | libs/input/InputWindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/input/InputWindow.cpp b/libs/input/InputWindow.cpp index 5c5613df82..5a60347ed3 100644 --- a/libs/input/InputWindow.cpp +++ b/libs/input/InputWindow.cpp @@ -98,7 +98,8 @@ status_t InputWindowInfo::write(Parcel& output) const { output.writeInt32(portalToDisplayId); applicationInfo.write(output); output.write(touchableRegion); - + output.writeBool(replaceTouchableRegionWithCrop); + output.writeWeakBinder(touchableRegionCropHandle); return OK; } @@ -140,6 +141,8 @@ InputWindowInfo InputWindowInfo::read(const Parcel& from) { ret.portalToDisplayId = from.readInt32(); ret.applicationInfo = InputApplicationInfo::read(from); from.read(ret.touchableRegion); + ret.replaceTouchableRegionWithCrop = from.readBool(); + ret.touchableRegionCropHandle = from.readWeakBinder(); return ret; } |