summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputWindow.cpp
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 02:15:45 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 02:15:45 +0100
commitd3ad4f1e64dfe162c03fbbbe79c21c3c20641f18 (patch)
treea21f7d76365795800eebfd006d34803a9304e04c /services/inputflinger/InputWindow.cpp
parentb2381c3e4b90d845d9713b7b29d64317b7f21ce8 (diff)
parentb22bca465e55618a949d9cbdea665a1a3a831241 (diff)
downloadframeworks_native-d3ad4f1e64dfe162c03fbbbe79c21c3c20641f18.zip
frameworks_native-d3ad4f1e64dfe162c03fbbbe79c21c3c20641f18.tar.gz
frameworks_native-d3ad4f1e64dfe162c03fbbbe79c21c3c20641f18.tar.bz2
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_frameworks_native into replicant-6.0
Diffstat (limited to 'services/inputflinger/InputWindow.cpp')
-rw-r--r--services/inputflinger/InputWindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/inputflinger/InputWindow.cpp b/services/inputflinger/InputWindow.cpp
index fda3ffa..1b913c5 100644
--- a/services/inputflinger/InputWindow.cpp
+++ b/services/inputflinger/InputWindow.cpp
@@ -36,14 +36,16 @@ bool InputWindowInfo::touchableRegionContainsPoint(int32_t x, int32_t y) const {
}
bool InputWindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
- return x >= frameLeft && x <= frameRight
- && y >= frameTop && y <= frameBottom;
+ return x >= frameLeft && x < frameRight
+ && y >= frameTop && y < frameBottom;
}
bool InputWindowInfo::isTrustedOverlay() const {
return layoutParamsType == TYPE_INPUT_METHOD
|| layoutParamsType == TYPE_INPUT_METHOD_DIALOG
|| layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
+ || layoutParamsType == TYPE_STATUS_BAR
+ || layoutParamsType == TYPE_NAVIGATION_BAR
|| layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY;
}
@@ -51,6 +53,11 @@ bool InputWindowInfo::supportsSplitTouch() const {
return layoutParamsFlags & FLAG_SPLIT_TOUCH;
}
+bool InputWindowInfo::overlaps(const InputWindowInfo* other) const {
+ return frameLeft < other->frameRight && frameRight > other->frameLeft
+ && frameTop < other->frameBottom && frameBottom > other->frameTop;
+}
+
// --- InputWindowHandle ---