Fix an issue that it will crash when the poinrter down event is received after window is hidden.

Signed-off-by: maojiangping <maojiangping@huawei.com>
Change-Id: Idddce1dde0d7783bd85cd36aea3ff39db62ea405
Signed-off-by: maojiangping <maojiangping@huawei.com>
This commit is contained in:
maojiangping
2022-04-21 16:16:56 +08:00
committed by xiahaiqin
parent f83a32255b
commit fc2f850442
+4
View File
@@ -474,6 +474,10 @@ WMError WindowController::ProcessPointDown(uint32_t windowId, bool isStartDrag)
WLOGFW("could not find window");
return WMError::WM_ERROR_NULLPTR;
}
if (!node->currentVisibility_) {
WLOGFE("this window is not visibile and not in window tree, windowId: %{public}u", windowId);
return WMError::WM_ERROR_INVALID_OPERATION;
}
if (isStartDrag) {
WMError res = windowRoot_->UpdateSizeChangeReason(windowId, WindowSizeChangeReason::DRAG_START);