Lines Matching refs:windowHandle
405 const sp<WindowInfoHandle> win = inputTarget.windowHandle; in createDispatchEntry()
631 bool isWindowOwnedBy(const sp<WindowInfoHandle>& windowHandle, gui::Pid pid, gui::Uid uid) { in isWindowOwnedBy() argument
632 if (windowHandle == nullptr) { in isWindowOwnedBy()
635 const WindowInfo* windowInfo = windowHandle->getInfo(); in isWindowOwnedBy()
721 touchedWindow.windowHandle = oldWindow; in getHoveringWindowsLocked()
729 touchedWindow.windowHandle = newWindow; in getHoveringWindowsLocked()
768 if (!window.windowHandle->getInfo()->inputConfig.test( in filterUntrustedTargets()
775 return target.connection->getToken() == window.windowHandle->getToken(); in filterUntrustedTargets()
797 if (touchedWindow.windowHandle->getInfo()->isSpy()) { in shouldSplitTouch()
801 if (touchedWindow.windowHandle->getInfo()->supportsSplitTouch()) { in shouldSplitTouch()
804 if (touchedWindow.windowHandle->getInfo()->inputConfig.test( in shouldSplitTouch()
1312 for (const auto& windowHandle : touchedSpies) { in shouldPruneInboundQueueLocked() local
1314 getConnectionLocked(windowHandle->getToken()); in shouldPruneInboundQueueLocked()
1423 for (const sp<WindowInfoHandle>& windowHandle : windowHandles) { in findTouchedWindowAtLocked() local
1424 if (ignoreDragWindow && haveSameToken(windowHandle, mDragState->dragWindow)) { in findTouchedWindowAtLocked()
1428 const WindowInfo& info = *windowHandle->getInfo(); in findTouchedWindowAtLocked()
1431 return windowHandle; in findTouchedWindowAtLocked()
1446 for (const sp<WindowInfoHandle>& windowHandle : windowHandles) { in findOutsideTargetsLocked() local
1447 if (windowHandle == touchedWindow) { in findOutsideTargetsLocked()
1453 const WindowInfo& info = *windowHandle->getInfo(); in findOutsideTargetsLocked()
1457 addPointerWindowTargetLocked(windowHandle, InputTarget::DispatchMode::OUTSIDE, in findOutsideTargetsLocked()
1470 for (const sp<WindowInfoHandle>& windowHandle : windowHandles) { in findTouchedSpyWindowsAtLocked() local
1471 const WindowInfo& info = *windowHandle->getInfo(); in findTouchedSpyWindowsAtLocked()
1480 spyWindows.push_back(windowHandle); in findTouchedSpyWindowsAtLocked()
2092 void InputDispatcher::enqueueDragEventLocked(const sp<WindowInfoHandle>& windowHandle, in enqueueDragEventLocked() argument
2095 const vec2 xy = windowHandle->getInfo()->transform.transform(vec2(rawX, rawY)); in enqueueDragEventLocked()
2097 std::make_unique<DragEntry>(mIdGenerator.nextId(), now(), windowHandle->getToken(), in enqueueDragEventLocked()
2180 sp<WindowInfoHandle> windowHandle; in cancelEventsForAnrLocked() local
2182 windowHandle = getWindowHandleLocked(connection->getToken()); in cancelEventsForAnrLocked()
2183 if (windowHandle == nullptr) { in cancelEventsForAnrLocked()
2190 synthesizeCancelationEventsForConnectionLocked(connection, options, windowHandle); in cancelEventsForAnrLocked()
2507 for (const sp<WindowInfoHandle>& windowHandle : newTouchedWindows) { in findTouchedWindowTargetsLocked() local
2508 if (!canWindowReceiveMotionLocked(windowHandle, entry)) { in findTouchedWindowTargetsLocked()
2514 tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId, pointer); in findTouchedWindowTargetsLocked()
2520 if (canReceiveForegroundTouches(*windowHandle->getInfo())) { in findTouchedWindowTargetsLocked()
2528 if (isWindowObscuredAtPointLocked(windowHandle, x, y)) { in findTouchedWindowTargetsLocked()
2530 } else if (isWindowObscuredLocked(windowHandle)) { in findTouchedWindowTargetsLocked()
2540 tempTouchState.addOrUpdateWindow(windowHandle, in findTouchedWindowTargetsLocked()
2549 << windowHandle->getName(); in findTouchedWindowTargetsLocked()
2559 windowHandle->getInfo()->inputConfig.test( in findTouchedWindowTargetsLocked()
2561 sp<WindowInfoHandle> wallpaper = findWallpaperWindowBelow(windowHandle); in findTouchedWindowTargetsLocked()
2705 if (mDragState && mDragState->dragWindow == touchedWindow.windowHandle) { in findTouchedWindowTargetsLocked()
2721 addPointerWindowTargetLocked(touchedWindow.windowHandle, touchedWindow.dispatchMode, in findTouchedWindowTargetsLocked()
2732 const auto err = verifyTargetedInjection(touchedWindow.windowHandle, entry); in findTouchedWindowTargetsLocked()
2778 addPointerWindowTargetLocked(touchedWindow.windowHandle, touchedWindow.dispatchMode, in findTouchedWindowTargetsLocked()
2785 LOG_ALWAYS_FATAL_IF(target.windowHandle == nullptr); in findTouchedWindowTargetsLocked()
2786 const auto err = verifyTargetedInjection(target.windowHandle, entry); in findTouchedWindowTargetsLocked()
2788 LOG(WARNING) << "Dropping injected event from " << target.windowHandle->getName() in findTouchedWindowTargetsLocked()
2949 const sp<android::gui::WindowInfoHandle>& windowHandle, in createInputTargetLocked() argument
2952 std::shared_ptr<Connection> connection = getConnectionLocked(windowHandle->getToken()); in createInputTargetLocked()
2954 ALOGW("Not creating InputTarget for %s, no input channel", windowHandle->getName().c_str()); in createInputTargetLocked()
2958 inputTarget.windowHandle = windowHandle; in createInputTargetLocked()
2961 inputTarget.globalScaleFactor = windowHandle->getInfo()->globalScaleFactor; in createInputTargetLocked()
2963 const auto& displayInfoIt = mDisplayInfos.find(windowHandle->getInfo()->displayId); in createInputTargetLocked()
2973 void InputDispatcher::addWindowTargetLocked(const sp<WindowInfoHandle>& windowHandle, in addWindowTargetLocked() argument
2980 [&windowHandle](const InputTarget& inputTarget) { in addWindowTargetLocked()
2981 return inputTarget.connection->getToken() == windowHandle->getToken(); in addWindowTargetLocked()
2984 const WindowInfo* windowInfo = windowHandle->getInfo(); in addWindowTargetLocked()
2988 createInputTargetLocked(windowHandle, dispatchMode, targetFlags, in addWindowTargetLocked()
3007 const sp<android::gui::WindowInfoHandle>& windowHandle, in addPointerWindowTargetLocked() argument
3015 LOG(FATAL) << "No pointers specified for " << windowHandle->getName(); in addPointerWindowTargetLocked()
3020 [&windowHandle](const InputTarget& inputTarget) { in addPointerWindowTargetLocked()
3021 return inputTarget.connection->getToken() == windowHandle->getToken(); in addPointerWindowTargetLocked()
3035 const WindowInfo* windowInfo = windowHandle->getInfo(); in addPointerWindowTargetLocked()
3039 createInputTargetLocked(windowHandle, dispatchMode, targetFlags, in addPointerWindowTargetLocked()
3090 static bool canBeObscuredBy(const sp<WindowInfoHandle>& windowHandle, in canBeObscuredBy() argument
3093 if (haveSameToken(windowHandle, otherHandle)) { in canBeObscuredBy()
3096 auto info = windowHandle->getInfo(); in canBeObscuredBy()
3139 const sp<WindowInfoHandle>& windowHandle, float x, float y) const { in computeTouchOcclusionInfoLocked() argument
3140 const WindowInfo* windowInfo = windowHandle->getInfo(); in computeTouchOcclusionInfoLocked()
3149 if (windowHandle == otherHandle) { in computeTouchOcclusionInfoLocked()
3153 if (canBeObscuredBy(windowHandle, otherHandle) && in computeTouchOcclusionInfoLocked()
3223 bool InputDispatcher::isWindowObscuredAtPointLocked(const sp<WindowInfoHandle>& windowHandle, in isWindowObscuredAtPointLocked() argument
3225 ui::LogicalDisplayId displayId = windowHandle->getInfo()->displayId; in isWindowObscuredAtPointLocked()
3228 if (windowHandle == otherHandle) { in isWindowObscuredAtPointLocked()
3232 if (canBeObscuredBy(windowHandle, otherHandle) && in isWindowObscuredAtPointLocked()
3240 bool InputDispatcher::isWindowObscuredLocked(const sp<WindowInfoHandle>& windowHandle) const { in isWindowObscuredLocked()
3241 ui::LogicalDisplayId displayId = windowHandle->getInfo()->displayId; in isWindowObscuredLocked()
3243 const WindowInfo* windowInfo = windowHandle->getInfo(); in isWindowObscuredLocked()
3245 if (windowHandle == otherHandle) { in isWindowObscuredLocked()
3249 if (canBeObscuredBy(windowHandle, otherHandle) && otherInfo->overlaps(windowInfo)) { in isWindowObscuredLocked()
3257 const InputApplicationHandle* applicationHandle, const sp<WindowInfoHandle>& windowHandle) { in getApplicationWindowLabel() argument
3259 if (windowHandle != nullptr) { in getApplicationWindowLabel()
3260 return applicationHandle->getName() + " - " + windowHandle->getName(); in getApplicationWindowLabel()
3264 } else if (windowHandle != nullptr) { in getApplicationWindowLabel()
3265 return windowHandle->getInfo()->applicationInfo.name + " - " + windowHandle->getName(); in getApplicationWindowLabel()
3441 if (isKeyOrMotion && !inputTarget.windowHandle && !connection->monitor) { in enqueueDispatchEntryLocked()
3693 if (target.windowHandle) { in processInteractionsLocked()
3694 interactionUids.emplace(target.windowHandle->getInfo()->ownerUid); in processInteractionsLocked()
4122 synthesizeCancelationEventsForWindowLocked(touchedWindow.windowHandle, options); in synthesizeCancelationEventsForAllConnectionsLocked()
4130 for (const auto& windowHandle : handles) { in synthesizeCancelationEventsForAllConnectionsLocked() local
4131 synthesizeCancelationEventsForWindowLocked(windowHandle, options); in synthesizeCancelationEventsForAllConnectionsLocked()
4151 const sp<WindowInfoHandle>& windowHandle, const CancelationOptions& options, in synthesizeCancelationEventsForWindowLocked() argument
4153 if (windowHandle == nullptr) { in synthesizeCancelationEventsForWindowLocked()
4158 if (windowHandle->getToken() != connection->getToken()) { in synthesizeCancelationEventsForWindowLocked()
4160 << ": Wrong connection provided for window: " << windowHandle->getName(); in synthesizeCancelationEventsForWindowLocked()
4165 connection ? connection : getConnectionLocked(windowHandle->getToken()); in synthesizeCancelationEventsForWindowLocked()
4167 LOG(DEBUG) << __func__ << "No connection found for window: " << windowHandle->getName(); in synthesizeCancelationEventsForWindowLocked()
4170 synthesizeCancelationEventsForConnectionLocked(resolvedConnection, options, windowHandle); in synthesizeCancelationEventsForWindowLocked()
4321 const auto& windowHandle = touchedWindowState->windowHandle; in synthesizePointerDownEventsForConnectionLocked() local
4333 if (windowHandle != nullptr) { in synthesizePointerDownEventsForConnectionLocked()
4339 addPointerWindowTargetLocked(windowHandle, InputTarget::DispatchMode::AS_IS, in synthesizePointerDownEventsForConnectionLocked()
5172 for (const sp<WindowInfoHandle>& windowHandle : windowHandles) { in getWindowHandleLocked() local
5173 if (windowHandle->getToken() == windowHandleToken) { in getWindowHandleLocked()
5174 return windowHandle; in getWindowHandleLocked()
5182 for (const sp<WindowInfoHandle>& windowHandle : getWindowHandlesLocked(*displayId)) { in getWindowHandleLocked() local
5183 if (windowHandle->getToken() == windowHandleToken) { in getWindowHandleLocked()
5184 return windowHandle; in getWindowHandleLocked()
5191 const sp<WindowInfoHandle>& windowHandle) const { in getWindowHandleLocked()
5194 if (handle->getId() == windowHandle->getId() && in getWindowHandleLocked()
5195 handle->getToken() == windowHandle->getToken()) { in getWindowHandleLocked()
5196 if (windowHandle->getInfo()->displayId != displayId) { in getWindowHandleLocked()
5199 windowHandle->getName().c_str(), displayId.toString().c_str(), in getWindowHandleLocked()
5200 windowHandle->getInfo()->displayId.toString().c_str()); in getWindowHandleLocked()
5401 if (getWindowHandleLocked(touchedWindow.windowHandle) != nullptr) { in setInputWindowsLocked()
5405 LOG(INFO) << "Touched window was removed: " << touchedWindow.windowHandle->getName() in setInputWindowsLocked()
5409 synthesizeCancelationEventsForWindowLocked(touchedWindow.windowHandle, options); in setInputWindowsLocked()
5413 touchedWindow.windowHandle->getInfo()->inputConfig.test( in setInputWindowsLocked()
5517 const auto windowHandle = in setFocusedDisplay() local
5519 if (windowHandle == nullptr) { in setFocusedDisplay()
5527 synthesizeCancelationEventsForWindowLocked(windowHandle, options); in setFocusedDisplay()
5657 sp<WindowInfoHandle> windowHandle = getWindowHandleLocked(focusedToken); in focusedWindowIsOwnedByLocked() local
5658 return isWindowOwnedBy(windowHandle, pid, uid); in focusedWindowIsOwnedByLocked()
5664 const sp<WindowInfoHandle> windowHandle = in recentWindowsAreOwnedByLocked()
5666 return isWindowOwnedBy(windowHandle, pid, uid); in recentWindowsAreOwnedByLocked()
5684 if (w.windowHandle->getToken() == token) { in findTouchStateWindowAndDisplayLocked()
5719 const sp<WindowInfoHandle> fromWindowHandle = touchedWindow->windowHandle; in transferTouchGesture()
5728 touchedWindow->windowHandle->getName().c_str(), in transferTouchGesture()
5812 window.windowHandle->getName().c_str()); in findTouchedForegroundWindowLocked()
5815 touchedForegroundWindow = window.windowHandle; in findTouchedForegroundWindowLocked()
6264 if (w.windowHandle->getToken() != token) { in pilferPointersLocked()
6265 synthesizeCancelationEventsForWindowLocked(w.windowHandle, options); in pilferPointersLocked()
6267 canceledWindows += w.windowHandle->getName(); in pilferPointersLocked()
6288 const sp<WindowInfoHandle> windowHandle = getWindowHandleLocked(windowToken); in requestPointerCapture() local
6290 windowHandle != nullptr ? windowHandle->getName().c_str() in requestPointerCapture()
6428 const auto windowHandle = getWindowHandleLocked(connection->getToken()); in doDispatchCycleFinishedCommand() local
6430 if (windowHandle != nullptr) { in doDispatchCycleFinishedCommand()
6432 createInputTargetLocked(windowHandle, InputTarget::DispatchMode::AS_IS, in doDispatchCycleFinishedCommand()
6683 const auto windowHandle = getWindowHandleLocked(connection->getToken()); in afterKeyEventLockedInterruptable() local
6684 if (windowHandle != nullptr) { in afterKeyEventLockedInterruptable()
6691 synthesizeCancelationEventsForWindowLocked(windowHandle, options, connection); in afterKeyEventLockedInterruptable()
6768 const auto windowHandle = getWindowHandleLocked(connection->getToken()); in afterKeyEventLockedInterruptable() local
6769 if (windowHandle != nullptr) { in afterKeyEventLockedInterruptable()
6774 synthesizeCancelationEventsForWindowLocked(windowHandle, options, connection); in afterKeyEventLockedInterruptable()
7064 const EventEntry& entry, const sp<android::gui::WindowInfoHandle>& windowHandle) const { in shouldDropInput()
7065 if (windowHandle->getInfo()->inputConfig.test(WindowInfo::InputConfig::DROP_INPUT) || in shouldDropInput()
7066 (windowHandle->getInfo()->inputConfig.test( in shouldDropInput()
7068 isWindowObscuredLocked(windowHandle))) { in shouldDropInput()
7071 ftl::enum_string(entry.type).c_str(), windowHandle->getName().c_str(), in shouldDropInput()
7072 windowHandle->getInfo()->inputConfig.string().c_str(), in shouldDropInput()
7073 windowHandle->getInfo()->displayId.toString().c_str()); in shouldDropInput()
7189 const sp<WindowInfoHandle>& windowHandle) const { in findWallpaperWindowBelow()
7191 getWindowHandlesLocked(windowHandle->getInfo()->displayId); in findWallpaperWindowBelow()
7194 if (!foundWindow && otherHandle != windowHandle) { in findWallpaperWindowBelow()
7197 if (windowHandle == otherHandle) { in findWallpaperWindowBelow()
7226 if (window.windowHandle->getToken() == token && in isPointerInWindow()