commit | d815095cb902af3ca4033c7c6b92fcad20f8901f | [log] [tgz] |
---|---|---|
author | Linnan Li <lilinnan@xiaomi.corp-partner.google.com> | Fri Jan 26 18:07:17 2024 +0000 |
committer | Prabir Pradhan <prabirmsp@google.com> | Tue Jan 30 00:28:44 2024 +0000 |
tree | 71e4ea8796e60c407868157b48d6147f8979a081 | |
parent | 168748f4c6762f718f55ca910193df94857b39bd [diff] [blame] |
Synthesize cancel event to global monitor specify display id When we failed to find WindowTarget, we will synthesize a cancel event to globalMonitor, at this time, we should specify the displayId, because globalMonitor is created according to the different display, we didn't specify it before, so we add it now. Bug: 314702448 Test: atest inputflinger_tests Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:e43c76ae092db81c6a7cb3c986055a2f994e72bc) Merged-In: Ic748082383119b465caa41da8301746fefea2be9 Change-Id: Ic748082383119b465caa41da8301746fefea2be9
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp index c349a58..d50e2b8 100644 --- a/services/inputflinger/dispatcher/InputDispatcher.cpp +++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -1961,6 +1961,7 @@ isPointerEvent ? CancelationOptions::Mode::CANCEL_POINTER_EVENTS : CancelationOptions::Mode::CANCEL_NON_POINTER_EVENTS); CancelationOptions options(mode, "input event injection failed"); + options.displayId = entry->displayId; synthesizeCancelationEventsForMonitorsLocked(options); return true; }