update wm/src/window_scene_session_impl.cpp.

修复子窗中aboutToapper获取windowRect大小为0的bug

Signed-off-by: 18 <571095797@qq.com>
This commit is contained in:
18 2024-11-02 07:30:54 +00:00 committed by Gitee
parent 292c4e15fa
commit 8bdf7ee260
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1069,6 +1069,7 @@ void WindowSceneSessionImpl::PreLayoutOnShow(WindowType type, const sptr<Display
auto hostSession = GetHostSession();
if (hostSession) {
WSRect wsRect = { requestRect.posX_, requestRect.posY_, requestRect.width_, requestRect.height_ };
property_ -> SetWindowRect(requestRect);
hostSession->UpdateClientRect(wsRect);
} else {
TLOGE(WmsLogTag::DEFAULT, "hostSession is null");