mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-22 04:55:33 -04:00
修复告警
Signed-off-by: xingyanan <xingyanan2@huawei.com> Change-Id: I9f5aa51b289ac901021fcad78f6c3d2788ff0a08
This commit is contained in:
@@ -57,7 +57,10 @@ bool WindowInfo::Marshalling(Parcel &parcel) const
|
||||
|
||||
WindowInfo* WindowInfo::Unmarshalling(Parcel &parcel)
|
||||
{
|
||||
WindowInfo* windowInfo = new WindowInfo();
|
||||
WindowInfo* windowInfo = new (std::nothrow) WindowInfo();
|
||||
if (windowInfo == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
bool res = parcel.ReadInt32(windowInfo->wid_) && parcel.ReadUint32(windowInfo->windowRect_.width_) &&
|
||||
parcel.ReadUint32(windowInfo->windowRect_.height_) && parcel.ReadInt32(windowInfo->windowRect_.posX_) &&
|
||||
parcel.ReadInt32(windowInfo->windowRect_.posY_) && parcel.ReadBool(windowInfo->focused_);
|
||||
|
||||
@@ -294,7 +294,7 @@ void WindowController::ProcessDisplayChange(DisplayId displayId, DisplayStateCha
|
||||
uint32_t height = static_cast<uint32_t>(displayInfo->GetHeight() * SYSTEM_BAR_HEIGHT_RATIO);
|
||||
Rect newRect = { 0, 0, width, height };
|
||||
ResizeRect(sysBarWinId_[WindowType::WINDOW_TYPE_STATUS_BAR], newRect, WindowSizeChangeReason::DRAG);
|
||||
newRect = { 0, displayInfo->GetHeight() - height, width, height };
|
||||
newRect = { 0, displayInfo->GetHeight() - static_cast<int32_t>(height), width, height };
|
||||
ResizeRect(sysBarWinId_[WindowType::WINDOW_TYPE_NAVIGATION_BAR], newRect, WindowSizeChangeReason::DRAG);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user