mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-22 13:05:55 -04:00
修复自由窗口进入分屏再退出分屏时模式不对的问题
Signed-off-by: xingyanan <xingyanan2@huawei.com> Change-Id: I793fb2ee890a86bee145f62d977dc2c2ee57cd7d
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user