修复自由窗口进入分屏再退出分屏时模式不对的问题

Signed-off-by: xingyanan <xingyanan2@huawei.com>
Change-Id: I793fb2ee890a86bee145f62d977dc2c2ee57cd7d
This commit is contained in:
xingyanan
2022-03-21 21:44:12 +08:00
parent c44b8031fc
commit 14ce1b0156
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -37,6 +37,7 @@ public:
void SetWindowHotZoneRect(const struct Rect& rect);
void SetWindowType(WindowType type);
void SetWindowMode(WindowMode mode);
void SetLastWindowMode(WindowMode mode);
void SetWindowBackgroundBlur(WindowBlurLevel level);
void ResumeLastWindowMode();
void SetFullScreen(bool isFullScreen);
@@ -62,6 +63,7 @@ public:
Rect GetWindowHotZoneRect() const;
WindowType GetWindowType() const;
WindowMode GetWindowMode() const;
WindowMode GetLastWindowMode() const;
WindowBlurLevel GetWindowBackgroundBlur() const;
bool GetFullScreen() const;
bool GetFocusable() const;
+16
View File
@@ -50,6 +50,11 @@ void WindowProperty::SetWindowMode(WindowMode mode)
mode_ = mode;
}
void WindowProperty::SetLastWindowMode(WindowMode mode)
{
lastMode_ = mode;
}
void WindowProperty::SetWindowBackgroundBlur(WindowBlurLevel level)
{
if (!WindowHelper::IsValidWindowBlurLevel(level)) {
@@ -155,6 +160,11 @@ WindowMode WindowProperty::GetWindowMode() const
return mode_;
}
WindowMode WindowProperty::GetLastWindowMode() const
{
return lastMode_;
}
WindowBlurLevel WindowProperty::GetWindowBackgroundBlur() const
{
return level_;
@@ -304,6 +314,11 @@ bool WindowProperty::Marshalling(Parcel& parcel) const
return false;
}
// write last mode_
if (!parcel.WriteUint32(static_cast<uint32_t>(lastMode_))) {
return false;
}
// write blur level_
if (!parcel.WriteUint32(static_cast<uint32_t>(level_))) {
return false;
@@ -399,6 +414,7 @@ sptr<WindowProperty> WindowProperty::Unmarshalling(Parcel& parcel)
property->SetWindowRect(rect);
property->SetWindowType(static_cast<WindowType>(parcel.ReadUint32()));
property->SetWindowMode(static_cast<WindowMode>(parcel.ReadUint32()));
property->SetLastWindowMode(static_cast<WindowMode>(parcel.ReadUint32()));
property->SetWindowBackgroundBlur(static_cast<WindowBlurLevel>(parcel.ReadUint32()));
property->SetWindowFlags(parcel.ReadUint32());
property->SetFullScreen(parcel.ReadBool());