mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
typo fix
Signed-off-by: Zhang Peng <zhangpeng280@huawei.com> Change-Id: Ia718cf408d5cadb26dc8174bca6e58f3298f358b
This commit is contained in:
parent
76aa34f363
commit
c462765da0
@ -51,11 +51,11 @@ void ScreenManagerTest::TearDown()
|
||||
|
||||
namespace {
|
||||
/**
|
||||
* @tc.name: CreateAndDestory01
|
||||
* @tc.name: CreateAndDestroy01
|
||||
* @tc.desc: CreateVirtualScreen with invalid option and return invalid screen id
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(ScreenManagerTest, CreateAndDestory01, Function | SmallTest | Level1)
|
||||
HWTEST_F(ScreenManagerTest, CreateAndDestroy01, Function | SmallTest | Level1)
|
||||
{
|
||||
VirtualScreenOption wrongOption = {defaultName_, defaultWidth_, defaultHeight_,
|
||||
defaultDensity_, nullptr, defaultFlags_};
|
||||
@ -69,11 +69,11 @@ HWTEST_F(ScreenManagerTest, CreateAndDestory01, Function | SmallTest | Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: CreateAndDestory02
|
||||
* @tc.name: CreateAndDestroy02
|
||||
* @tc.desc: CreateVirtualScreen with valid option and return valid screen id
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(ScreenManagerTest, CreateAndDestory02, Function | SmallTest | Level1)
|
||||
HWTEST_F(ScreenManagerTest, CreateAndDestroy02, Function | SmallTest | Level1)
|
||||
{
|
||||
ScreenManagerUtils utils;
|
||||
ASSERT_TRUE(utils.CreateSurface());
|
||||
|
@ -108,7 +108,7 @@ std::shared_ptr<Media::PixelMap> AbstractDisplayController::GetScreenSnapshot(Di
|
||||
{
|
||||
sptr<AbstractDisplay> abstractDisplay = GetAbstractDisplay(displayId);
|
||||
if (abstractDisplay == nullptr) {
|
||||
WLOGFE("GetScreenSnapshot: GetAbstarctDisplay failed");
|
||||
WLOGFE("GetScreenSnapshot: GetAbstractDisplay failed");
|
||||
return nullptr;
|
||||
}
|
||||
ScreenId dmsScreenId = abstractDisplay->GetAbstractScreenId();
|
||||
|
@ -243,7 +243,7 @@ Rotation AbstractScreen::CalcRotation(Orientation orientation) const
|
||||
if (info == nullptr) {
|
||||
return Rotation::ROTATION_0;
|
||||
}
|
||||
// virtical: phone(Plugin screen); horizontal: pad & external screen
|
||||
// vertical: phone(Plugin screen); horizontal: pad & external screen
|
||||
bool isVerticalScreen = info->width_ < info->height_;
|
||||
switch (orientation) {
|
||||
case Orientation::UNSPECIFIED: {
|
||||
|
@ -60,7 +60,7 @@ void AbstractScreenController::RegisterRsScreenConnectionChangeListener()
|
||||
auto task = [this] {
|
||||
RegisterRsScreenConnectionChangeListener();
|
||||
};
|
||||
// posk task after 50 ms.
|
||||
// post task after 50 ms.
|
||||
controllerHandler_->PostTask(task, 50, AppExecFwk::EventQueue::Priority::HIGH);
|
||||
}
|
||||
bool callbackRegister = DisplayManagerAgentController::GetInstance().SetRemoveAgentCallback(
|
||||
@ -642,7 +642,7 @@ bool AbstractScreenController::SetRotation(ScreenId screenId, Rotation rotationA
|
||||
{
|
||||
auto screen = GetAbstractScreen(screenId);
|
||||
if (rotationAfter != screen->rotation_) {
|
||||
WLOGI("set orientation. roatiton %{public}u", rotationAfter);
|
||||
WLOGI("set orientation. rotation %{public}u", rotationAfter);
|
||||
ScreenId rsScreenId;
|
||||
if (!screenIdManager_.ConvertToRsScreenId(screenId, rsScreenId)) {
|
||||
WLOGE("Convert to RsScreenId fail. screenId: %{public}" PRIu64"", screenId);
|
||||
|
@ -366,7 +366,7 @@ ScreenId DisplayManagerService::GetScreenIdByDisplayId(DisplayId displayId) cons
|
||||
{
|
||||
sptr<AbstractDisplay> abstractDisplay = abstractDisplayController_->GetAbstractDisplay(displayId);
|
||||
if (abstractDisplay == nullptr) {
|
||||
WLOGFE("GetScreenIdByDisplayId: GetAbstarctDisplay failed");
|
||||
WLOGFE("GetScreenIdByDisplayId: GetAbstractDisplay failed");
|
||||
return SCREEN_ID_INVALID;
|
||||
}
|
||||
return abstractDisplay->GetAbstractScreenId();
|
||||
|
@ -24,7 +24,7 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplaySensorController"};
|
||||
constexpr int64_t ORIENTATION_SENSOR_SAMPING_RATE = 200000000; // 200ms
|
||||
constexpr int64_t ORIENTATION_SENSOR_SAMPLING_RATE = 200000000; // 200ms
|
||||
constexpr int64_t ORIENTATION_SENSOR_REPORTING_RATE = 200000000; // 200ms
|
||||
constexpr long ORIENTATION_SENSOR_CALLBACK_TIME_INTERVAL = 200; // 200ms
|
||||
constexpr int VALID_INCLINATION_ANGLE_THRESHOLD_COEFFICIENT = 3;
|
||||
@ -54,7 +54,7 @@ void ScreenRotationController::SubscribeGravitySensor()
|
||||
user_.userData = nullptr;
|
||||
user_.callback = &HandleGravitySensorEventCallback;
|
||||
SubscribeSensor(SENSOR_TYPE_ID_GRAVITY, &user_);
|
||||
SetBatch(SENSOR_TYPE_ID_GRAVITY, &user_, ORIENTATION_SENSOR_SAMPING_RATE, ORIENTATION_SENSOR_REPORTING_RATE);
|
||||
SetBatch(SENSOR_TYPE_ID_GRAVITY, &user_, ORIENTATION_SENSOR_SAMPLING_RATE, ORIENTATION_SENSOR_REPORTING_RATE);
|
||||
SetMode(SENSOR_TYPE_ID_GRAVITY, &user_, SENSOR_ON_CHANGE);
|
||||
ActivateSensor(SENSOR_TYPE_ID_GRAVITY, &user_);
|
||||
isGravitySensorSubscribed_ = true;
|
||||
|
@ -25,7 +25,7 @@
|
||||
# // __BASE is used for defining the basic info of the event.
|
||||
# // "type" optional values are: FAULT, STATISTICS, SECURITY, BEHAVIOR.
|
||||
# // "level" optional values are: CRITICAL, MINOR.
|
||||
# // "tag" set tags with may used by subscriber of this event, multiple tags devided by space.
|
||||
# // "tag" set tags with may used by subscriber of this event, multiple tags divided by space.
|
||||
# // "desc" full description of this event.
|
||||
# @PARAMETER: {type: parameter type, arrsize: array length(optional), desc: parameter description}.
|
||||
# // follow the __BASE block, each line defines a parameter of this event.
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
virtual ~SurfaceReaderHandler() noexcept
|
||||
{
|
||||
}
|
||||
virtual bool OnImageAvalible(sptr<Media::PixelMap> pixleMap) = 0;
|
||||
virtual bool OnImageAvailable(sptr<Media::PixelMap> pixelMap) = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +23,14 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
class SurfaceReaderHandlerImpl : public SurfaceReaderHandler {
|
||||
public:
|
||||
bool OnImageAvalible(sptr<Media::PixelMap> pixleMap) override;
|
||||
bool OnImageAvailable(sptr<Media::PixelMap> pixelMap) override;
|
||||
bool IsImageOk();
|
||||
void ResetFlag();
|
||||
sptr<Media::PixelMap> GetPixelMap();
|
||||
|
||||
private:
|
||||
bool flag_ = false;
|
||||
sptr<Media::PixelMap> pixleMap_ = nullptr;
|
||||
sptr<Media::PixelMap> pixelMap_ = nullptr;
|
||||
std::recursive_mutex mutex_;
|
||||
};
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
return ((IsMainWindow(type)) && (mode != WindowMode::WINDOW_MODE_FLOATING));
|
||||
}
|
||||
|
||||
static inline bool IsFloatintWindow(WindowMode mode)
|
||||
static inline bool IsFloatingWindow(WindowMode mode)
|
||||
{
|
||||
return mode == WindowMode::WINDOW_MODE_FLOATING;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ namespace {
|
||||
constexpr uint32_t MIN_HORIZONTAL_SPLIT_WIDTH = 320;
|
||||
constexpr uint32_t MAX_FLOATING_SIZE = 2560;
|
||||
const std::string WINDOW_MANAGER_CONFIG_XML = "/system/etc/window/resources/window_manager_config.xml";
|
||||
const Rect IVALID_EMPTY_RECT = {0, 0, 0, 0};
|
||||
const Rect INVALID_EMPTY_RECT = {0, 0, 0, 0};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ bool SurfaceReader::ProcessBuffer(const sptr<SurfaceBuffer> &buf)
|
||||
|
||||
pixelMap->SetPixelsAddr(data, nullptr, width * height, AllocatorType::HEAP_ALLOC, nullptr);
|
||||
|
||||
handler_->OnImageAvalible(pixelMap);
|
||||
handler_->OnImageAvailable(pixelMap);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SurfaceReaderHandlerImpl"};
|
||||
} // namespace
|
||||
bool SurfaceReaderHandlerImpl::OnImageAvalible(sptr<Media::PixelMap> pixleMap)
|
||||
bool SurfaceReaderHandlerImpl::OnImageAvailable(sptr<Media::PixelMap> pixelMap)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
if (!flag_) {
|
||||
flag_ = true;
|
||||
pixleMap_ = pixleMap;
|
||||
pixelMap_ = pixelMap;
|
||||
WLOGFI("Get an Image!");
|
||||
}
|
||||
return true;
|
||||
@ -49,7 +49,7 @@ void SurfaceReaderHandlerImpl::ResetFlag()
|
||||
sptr<Media::PixelMap> SurfaceReaderHandlerImpl::GetPixelMap()
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
return pixleMap_;
|
||||
return pixelMap_;
|
||||
}
|
||||
}
|
||||
}
|
@ -49,7 +49,7 @@ public:
|
||||
virtual void ProcessPointUp(uint32_t windowId);
|
||||
virtual void MinimizeAllAppWindows(DisplayId displayId);
|
||||
virtual WMError ToggleShownStateForAllAppWindows();
|
||||
virtual WMError MaxmizeWindow(uint32_t windowId);
|
||||
virtual WMError MaximizeWindow(uint32_t windowId);
|
||||
virtual WMError SetWindowLayoutMode(WindowLayoutMode mode);
|
||||
virtual WMError UpdateProperty(sptr<WindowProperty>& windowProperty, PropertyChangeAction action);
|
||||
virtual WMError GetSystemConfig(SystemConfig& systemConfig);
|
||||
|
@ -189,7 +189,7 @@ public:
|
||||
void NotifySizeChange(Rect rect, WindowSizeChangeReason reason);
|
||||
void NotifyKeyEvent(std::shared_ptr<MMI::KeyEvent> &keyEvent);
|
||||
void NotifyPointEvent(std::shared_ptr<MMI::PointerEvent>& pointerEvent);
|
||||
void NotifyAviodAreaChange(const std::vector<Rect>& avoidArea);
|
||||
void NotifyAvoidAreaChange(const std::vector<Rect>& avoidArea);
|
||||
void NotifyDisplayMoveChange(DisplayId from, DisplayId to);
|
||||
void NotifyOccupiedAreaChange(const sptr<OccupiedAreaChangeInfo>& info);
|
||||
void NotifyModeChange(WindowMode mode);
|
||||
@ -318,7 +318,7 @@ private:
|
||||
// colorspace, gamut
|
||||
using ColorSpaceConvertMap = struct {
|
||||
ColorSpace colorSpace;
|
||||
ColorGamut sufaceColorGamut;
|
||||
ColorGamut surfaceColorGamut;
|
||||
};
|
||||
static const ColorSpaceConvertMap colorSpaceConvertMap[];
|
||||
static ColorSpace GetColorSpaceFromSurfaceGamut(ColorGamut ColorGamut);
|
||||
@ -361,7 +361,7 @@ private:
|
||||
Rect startRectExceptFrame_ = { 0, 0, 0, 0 };
|
||||
Rect startRectExceptCorner_ = { 0, 0, 0, 0 };
|
||||
DragType dragType_ = DragType::DRAG_UNDEFINED;
|
||||
bool isAppDecorEnbale_ = true;
|
||||
bool isAppDecorEnable_ = true;
|
||||
SystemConfig windowSystemConfig_ ;
|
||||
bool isOriginRectSet_ = false;
|
||||
bool isWaitingFrame_ = false;
|
||||
|
@ -149,11 +149,11 @@ WMError WindowAdapter::ToggleShownStateForAllAppWindows()
|
||||
return windowManagerServiceProxy_->ToggleShownStateForAllAppWindows();
|
||||
}
|
||||
|
||||
WMError WindowAdapter::MaxmizeWindow(uint32_t windowId)
|
||||
WMError WindowAdapter::MaximizeWindow(uint32_t windowId)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_ERROR_SAMGR);
|
||||
|
||||
return windowManagerServiceProxy_->MaxmizeWindow(windowId);
|
||||
return windowManagerServiceProxy_->MaximizeWindow(windowId);
|
||||
}
|
||||
|
||||
WMError WindowAdapter::GetSystemConfig(SystemConfig& systemConfig)
|
||||
|
@ -314,7 +314,7 @@ WMError WindowImpl::SetWindowType(WindowType type)
|
||||
return WMError::WM_ERROR_INVALID_PARAM;
|
||||
}
|
||||
property_->SetWindowType(type);
|
||||
if (isAppDecorEnbale_ && windowSystemConfig_.isSystemDecorEnable_) {
|
||||
if (isAppDecorEnable_ && windowSystemConfig_.isSystemDecorEnable_) {
|
||||
property_->SetDecorEnable(WindowHelper::IsMainWindow(property_->GetWindowType()));
|
||||
}
|
||||
AdjustWindowAnimationFlag();
|
||||
@ -442,7 +442,7 @@ WMError WindowImpl::SetUIContent(const std::string& contentInfo,
|
||||
WLOGFE("fail to SetUIContent id: %{public}u", property_->GetWindowId());
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
if (!isAppDecorEnbale_ || !windowSystemConfig_.isSystemDecorEnable_) {
|
||||
if (!isAppDecorEnable_ || !windowSystemConfig_.isSystemDecorEnable_) {
|
||||
WLOGFI("app set decor enable false");
|
||||
property_->SetDecorEnable(false);
|
||||
}
|
||||
@ -490,7 +490,7 @@ std::string WindowImpl::GetContentInfo()
|
||||
ColorSpace WindowImpl::GetColorSpaceFromSurfaceGamut(ColorGamut ColorGamut)
|
||||
{
|
||||
for (auto item: colorSpaceConvertMap) {
|
||||
if (item.sufaceColorGamut == ColorGamut) {
|
||||
if (item.surfaceColorGamut == ColorGamut) {
|
||||
return item.colorSpace;
|
||||
}
|
||||
}
|
||||
@ -501,7 +501,7 @@ ColorGamut WindowImpl::GetSurfaceGamutFromColorSpace(ColorSpace colorSpace)
|
||||
{
|
||||
for (auto item: colorSpaceConvertMap) {
|
||||
if (item.colorSpace == colorSpace) {
|
||||
return item.sufaceColorGamut;
|
||||
return item.surfaceColorGamut;
|
||||
}
|
||||
}
|
||||
return ColorGamut::COLOR_GAMUT_SRGB;
|
||||
@ -1147,7 +1147,7 @@ void WindowImpl::DisableAppWindowDecor()
|
||||
return;
|
||||
}
|
||||
WLOGFI("disable app window decoration.");
|
||||
isAppDecorEnbale_ = false;
|
||||
isAppDecorEnable_ = false;
|
||||
}
|
||||
|
||||
bool WindowImpl::IsDecorEnable() const
|
||||
@ -1494,7 +1494,7 @@ void WindowImpl::SetModeSupportInfo(uint32_t modeSupportInfo)
|
||||
property_->SetModeSupportInfo(modeSupportInfo);
|
||||
UpdateProperty(PropertyChangeAction::ACTION_UPDATE_MODE_SUPPORT_INFO);
|
||||
if (!WindowHelper::IsWindowModeSupported(modeSupportInfo, GetMode())) {
|
||||
WLOGFI("currunt window mode is not supported, force to transform to appropriate mode. window id:%{public}u",
|
||||
WLOGFI("current window mode is not supported, force to transform to appropriate mode. window id:%{public}u",
|
||||
GetWindowId());
|
||||
WindowMode mode = WindowHelper::GetWindowModeFromModeSupportInfo(modeSupportInfo);
|
||||
if (mode != WindowMode::WINDOW_MODE_UNDEFINED) {
|
||||
@ -1948,7 +1948,7 @@ void WindowImpl::UpdateConfiguration(const std::shared_ptr<AppExecFwk::Configura
|
||||
void WindowImpl::UpdateAvoidArea(const std::vector<Rect>& avoidArea)
|
||||
{
|
||||
WLOGFI("Window Update AvoidArea, id: %{public}u", property_->GetWindowId());
|
||||
NotifyAviodAreaChange(avoidArea);
|
||||
NotifyAvoidAreaChange(avoidArea);
|
||||
}
|
||||
|
||||
void WindowImpl::UpdateWindowState(WindowState state)
|
||||
@ -2127,7 +2127,7 @@ void WindowImpl::NotifyPointEvent(std::shared_ptr<MMI::PointerEvent>& pointerEve
|
||||
});
|
||||
}
|
||||
|
||||
void WindowImpl::NotifyAviodAreaChange(const std::vector<Rect>& avoidArea)
|
||||
void WindowImpl::NotifyAvoidAreaChange(const std::vector<Rect>& avoidArea)
|
||||
{
|
||||
std::vector<sptr<IAvoidAreaChangedListener>> avoidAreaChangeListeners;
|
||||
{
|
||||
@ -2215,7 +2215,7 @@ Rect WindowImpl::GetSystemAlarmWindowDefaultSize(Rect defaultRect)
|
||||
SYSTEM_ALARM_WINDOW_HEIGHT_RATIO));
|
||||
|
||||
rect = { static_cast<int32_t>((width - alarmWidth) / 2), static_cast<int32_t>((height - alarmHeight) / 2),
|
||||
alarmWidth, alarmHeight }; // devided by 2 to middle the window
|
||||
alarmWidth, alarmHeight }; // divided by 2 to middle the window
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
@ -126,17 +126,17 @@ void IPCSpecificInterfaceFuzzTest2(sptr<IRemoteObject> proxy, MessageParcel& sen
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_SET_BACKGROUND_BLUR),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_SET_APLPHA),
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_SET_ALPHA),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_UPDATE_LAYOUT_MODE),
|
||||
sendData, reply, option);
|
||||
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_MAXMIZE_WINDOW),
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_MAXIMIZE_WINDOW),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_UPDATE_PROPERTY),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(
|
||||
static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_GET_ACCCESSIBILITY_WIDDOW_INFO_ID),
|
||||
static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_GET_ACCESSIBILITY_WINDOW_INFO_ID),
|
||||
sendData, reply, option);
|
||||
proxy->SendRequest(
|
||||
static_cast<uint32_t>(IWindowManager::WindowManagerMessage::TRANS_ID_ANIMATION_SET_CONTROLLER),
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
MOCK_METHOD2(SetWindowBackgroundBlur, WMError(uint32_t windowId, WindowBlurLevel level));
|
||||
MOCK_METHOD2(SetAlpha, WMError(uint32_t windowId, float alpha));
|
||||
MOCK_METHOD2(UpdateProperty, WMError(sptr<WindowProperty>& windowProperty, PropertyChangeAction action));
|
||||
MOCK_METHOD1(MaxmizeWindow, WMError(uint32_t windowId));
|
||||
MOCK_METHOD1(MaximizeWindow, WMError(uint32_t windowId));
|
||||
};
|
||||
}
|
||||
} // namespace OHOS
|
||||
|
@ -1309,7 +1309,7 @@ HWTEST_F(WindowImplTest, SetTouchable02, Function | SmallTest | Level3)
|
||||
|
||||
/**
|
||||
* @tc.name: DisableAppWindowDecor01
|
||||
* @tc.desc: disbale app window decor
|
||||
* @tc.desc: disable app window decor
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(WindowImplTest, DisableAppWindowDecor01, Function | SmallTest | Level3)
|
||||
@ -1323,7 +1323,7 @@ HWTEST_F(WindowImplTest, DisableAppWindowDecor01, Function | SmallTest | Level3)
|
||||
window->DisableAppWindowDecor();
|
||||
EXPECT_CALL(m->Mock(), AddWindow(_)).Times(1).WillOnce(Return(WMError::WM_OK));
|
||||
ASSERT_EQ(WMError::WM_OK, window->Show());
|
||||
ASSERT_FALSE(window->isAppDecorEnbale_);
|
||||
ASSERT_FALSE(window->isAppDecorEnable_);
|
||||
EXPECT_CALL(m->Mock(), DestroyWindow(_)).Times(1).WillOnce(Return(WMError::WM_OK));
|
||||
ASSERT_EQ(WMError::WM_OK, window->Destroy());
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
private:
|
||||
std::vector<sptr<WindowNode>>* GetWindowNodesByDisplayIdAndRootType(DisplayId displayId, WindowRootNodeType type);
|
||||
void AddWindowNodeOnWindowTree(sptr<WindowNode>& node, WindowRootNodeType rootType);
|
||||
void ProcessNotCrossNodesOnDestroiedDisplay(DisplayId displayId, std::vector<uint32_t>& windowIds);
|
||||
void ProcessNotCrossNodesOnDestroyedDisplay(DisplayId displayId, std::vector<uint32_t>& windowIds);
|
||||
void ProcessDisplaySizeChangeOrRotation(DisplayId defaultDisplayId, DisplayId displayId,
|
||||
const std::map<DisplayId, Rect>& displayRectMap, DisplayStateChangeType type);
|
||||
void ProcessCrossNodes(DisplayId defaultDisplayId, DisplayStateChangeType type);
|
||||
@ -72,7 +72,7 @@ private:
|
||||
void UpdateWindowDisplayIdIfNeeded(const sptr<WindowNode>& node,
|
||||
const std::vector<DisplayId>& curShowingDisplays);
|
||||
void UpdateWindowDisplayId(const sptr<WindowNode>& node, DisplayId newDisplayId);
|
||||
void ClearMapOfDestroiedDisplay(DisplayId displayId);
|
||||
void ClearMapOfDestroyedDisplay(DisplayId displayId);
|
||||
void ChangeToRectInDisplayGroup(const sptr<WindowNode>& node);
|
||||
|
||||
sptr<WindowNodeContainer> windowNodeContainer_;
|
||||
|
@ -26,7 +26,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
enum class MinimizeReason : uint32_t {
|
||||
MINIMIZE_BUTTOM,
|
||||
MINIMIZE_BUTTON,
|
||||
MINIMIZE_ALL,
|
||||
LAYOUT_TILE,
|
||||
MAX_APP_COUNT,
|
||||
@ -51,7 +51,7 @@ public:
|
||||
private:
|
||||
static inline bool IsFromUser(MinimizeReason reason)
|
||||
{
|
||||
return (reason == MinimizeReason::MINIMIZE_ALL || reason == MinimizeReason::MINIMIZE_BUTTOM ||
|
||||
return (reason == MinimizeReason::MINIMIZE_ALL || reason == MinimizeReason::MINIMIZE_BUTTON ||
|
||||
reason == MinimizeReason::MAX_APP_COUNT || reason == MinimizeReason::LAYOUT_TILE ||
|
||||
reason == MinimizeReason::SPLIT_REPLACE || reason == MinimizeReason::SPLIT_QUIT);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
WMError ProcessPointUp(uint32_t windowId);
|
||||
void MinimizeAllAppWindows(DisplayId displayId);
|
||||
WMError ToggleShownStateForAllAppWindows();
|
||||
WMError MaxmizeWindow(uint32_t windowId);
|
||||
WMError MaximizeWindow(uint32_t windowId);
|
||||
WMError SetWindowLayoutMode(WindowLayoutMode mode);
|
||||
WMError UpdateProperty(sptr<WindowProperty>& property, PropertyChangeAction action);
|
||||
void NotifySystemBarTints();
|
||||
|
@ -89,7 +89,7 @@ protected:
|
||||
void LimitFloatingWindowSize(const sptr<WindowNode>& node, const Rect& displayRect, Rect& winRect) const;
|
||||
void LimitMainFloatingWindowPosition(const sptr<WindowNode>& node, Rect& winRect) const;
|
||||
|
||||
void UpdateFloatongWindowSizeForStretchableWindow(const sptr<WindowNode>& node,
|
||||
void UpdateFloatingWindowSizeForStretchableWindow(const sptr<WindowNode>& node,
|
||||
const Rect& displayRect, Rect& winRect) const;
|
||||
void UpdateFloatingWindowSizeByCustomizedLimits(const sptr<WindowNode>& node,
|
||||
const Rect& displayRect, Rect& winRect) const;
|
||||
@ -113,7 +113,7 @@ protected:
|
||||
Rect secondaryLimitRect_;
|
||||
Rect dividerRect_;
|
||||
Rect firstCascadeRect_;
|
||||
std::vector<int32_t> exitSplitPoints_; // 2 element, first elment < second element
|
||||
std::vector<int32_t> exitSplitPoints_; // 2 element, first element < second element
|
||||
std::vector<int32_t> splitRatioPoints_;
|
||||
};
|
||||
sptr<DisplayGroupInfo> displayGroupInfo_;
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
WMError GetTopWindowId(uint32_t mainWinId, uint32_t& topWinId) override;
|
||||
void MinimizeAllAppWindows(DisplayId displayId) override;
|
||||
WMError ToggleShownStateForAllAppWindows() override;
|
||||
WMError MaxmizeWindow(uint32_t windowId) override;
|
||||
WMError MaximizeWindow(uint32_t windowId) override;
|
||||
WMError SetWindowLayoutMode(WindowLayoutMode mode) override;
|
||||
WMError UpdateProperty(sptr<WindowProperty>& windowProperty, PropertyChangeAction action) override;
|
||||
WMError GetAccessibilityWindowInfo(sptr<AccessibilityWindowInfo>& windowInfo) override;
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
|
||||
sptr<WindowLayoutPolicy> GetLayoutPolicy() const;
|
||||
sptr<AvoidAreaController> GetAvoidController() const;
|
||||
sptr<DisplayGroupController> GetMutiDisplayController() const;
|
||||
sptr<DisplayGroupController> GetMultiDisplayController() const;
|
||||
sptr<WindowNode> GetRootNode(WindowRootNodeType type) const;
|
||||
void NotifyDockWindowStateChanged(sptr<WindowNode>& node, bool isEnable);
|
||||
|
||||
@ -129,7 +129,7 @@ private:
|
||||
bool IsSplitImmersiveNode(sptr<WindowNode> node) const;
|
||||
bool TraverseFromTopToBottom(sptr<WindowNode> node, const WindowNodeOperationFunc& func) const;
|
||||
bool TraverseFromBottomToTop(sptr<WindowNode> node, const WindowNodeOperationFunc& func) const;
|
||||
void RcoveryScreenDefaultOrientationIfNeed(DisplayId displayId);
|
||||
void RecoverScreenDefaultOrientationIfNeed(DisplayId displayId);
|
||||
// cannot determine in case of a window covered by union of several windows or with transparent value
|
||||
void UpdateWindowVisibilityInfos(std::vector<sptr<WindowVisibilityInfo>>& infos);
|
||||
void RaiseOrderedWindowToTop(std::vector<sptr<WindowNode>>& orderedNodes,
|
||||
@ -159,7 +159,7 @@ private:
|
||||
std::map<uint32_t, WindowMode> backupWindowMode_;
|
||||
std::map<DisplayId, Rect> backupDividerWindowRect_;
|
||||
sptr<WindowZorderPolicy> zorderPolicy_ = new WindowZorderPolicy();
|
||||
std::unordered_map<WindowLayoutMode, sptr<WindowLayoutPolicy>> layoutPolicys_;
|
||||
std::unordered_map<WindowLayoutMode, sptr<WindowLayoutPolicy>> layoutPolicies_;
|
||||
WindowLayoutMode layoutMode_ = WindowLayoutMode::CASCADE;
|
||||
std::vector<Rect> currentCoveredArea_;
|
||||
std::vector<uint32_t> removedIds_;
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
/**
|
||||
* Constructor used to create an empty WindowPair instance.
|
||||
*
|
||||
* @param displayId the disply of window pair
|
||||
* @param displayId the display of window pair
|
||||
* @param appNode the window root of app window
|
||||
*/
|
||||
WindowPair(const DisplayId& displayId, DisplayGroupWindowTree& displayGroupWindowTree);
|
||||
@ -221,7 +221,7 @@ private:
|
||||
void DumpPairInfo();
|
||||
|
||||
/**
|
||||
* Find pairable window frome window trees.
|
||||
* Find pairable window from window trees.
|
||||
*
|
||||
* @param node the node waiting to be paired
|
||||
* @return window node
|
||||
@ -237,7 +237,7 @@ private:
|
||||
sptr<WindowNode> GetPairableWindow(sptr<WindowNode>& node);
|
||||
|
||||
/**
|
||||
* Send brodcast message of split event.
|
||||
* Send broadcast message of split event.
|
||||
*
|
||||
* @param node trigger node
|
||||
*/
|
||||
@ -253,7 +253,7 @@ private:
|
||||
WindowPairStatus status_ = {WindowPairStatus::STATUS_EMPTY};
|
||||
DisplayGroupWindowTree& displayGroupWindowTree_;
|
||||
bool isAllAppWindowsRestoring_ { false };
|
||||
Rect initalDivderRect_ {0, 0, 0, 0};
|
||||
Rect initalDividerRect_ {0, 0, 0, 0};
|
||||
};
|
||||
} // namespace Rosen
|
||||
} // namespace OHOS
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
WMError GetTopWindowId(uint32_t mainWinId, uint32_t& topWinId);
|
||||
void MinimizeAllAppWindows(DisplayId displayId);
|
||||
WMError ToggleShownStateForAllAppWindows();
|
||||
WMError MaxmizeWindow(uint32_t windowId);
|
||||
WMError MaximizeWindow(uint32_t windowId);
|
||||
WMError SetWindowLayoutMode(DisplayId displayId, WindowLayoutMode mode);
|
||||
|
||||
void ProcessWindowStateChange(WindowState state, WindowStateChangeReason reason);
|
||||
|
@ -50,11 +50,11 @@ public:
|
||||
TRANS_ID_MINIMIZE_ALL_APP_WINDOWS,
|
||||
TRANS_ID_TOGGLE_SHOWN_STATE_FOR_ALL_APP_WINDOWS,
|
||||
TRANS_ID_SET_BACKGROUND_BLUR,
|
||||
TRANS_ID_SET_APLPHA,
|
||||
TRANS_ID_SET_ALPHA,
|
||||
TRANS_ID_UPDATE_LAYOUT_MODE,
|
||||
TRANS_ID_MAXMIZE_WINDOW,
|
||||
TRANS_ID_MAXIMIZE_WINDOW,
|
||||
TRANS_ID_UPDATE_PROPERTY,
|
||||
TRANS_ID_GET_ACCCESSIBILITY_WIDDOW_INFO_ID,
|
||||
TRANS_ID_GET_ACCESSIBILITY_WINDOW_INFO_ID,
|
||||
TRANS_ID_ANIMATION_SET_CONTROLLER,
|
||||
TRANS_ID_GET_SYSTEM_CONFIG,
|
||||
TRANS_ID_NOTIFY_WINDOW_TRANSITION,
|
||||
@ -76,7 +76,7 @@ public:
|
||||
virtual void ProcessPointUp(uint32_t windowId) = 0;
|
||||
virtual void MinimizeAllAppWindows(DisplayId displayId) = 0;
|
||||
virtual WMError ToggleShownStateForAllAppWindows() = 0;
|
||||
virtual WMError MaxmizeWindow(uint32_t windowId) = 0;
|
||||
virtual WMError MaximizeWindow(uint32_t windowId) = 0;
|
||||
virtual WMError SetWindowLayoutMode(WindowLayoutMode mode) = 0;
|
||||
virtual WMError UpdateProperty(sptr<WindowProperty>& windowProperty, PropertyChangeAction action) = 0;
|
||||
virtual void RegisterWindowManagerAgent(WindowManagerAgentType type,
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
void ProcessPointUp(uint32_t windowId) override;
|
||||
void MinimizeAllAppWindows(DisplayId displayId) override;
|
||||
WMError ToggleShownStateForAllAppWindows() override;
|
||||
WMError MaxmizeWindow(uint32_t windowId) override;
|
||||
WMError MaximizeWindow(uint32_t windowId) override;
|
||||
WMError SetWindowLayoutMode(WindowLayoutMode mode) override;
|
||||
WMError UpdateProperty(sptr<WindowProperty>& windowProperty, PropertyChangeAction action) override;
|
||||
|
||||
|
@ -46,7 +46,7 @@ void AvoidAreaController::UpdateAvoidNodesMap(DisplayId displayId, bool isAdd)
|
||||
bool AvoidAreaController::IsAvoidAreaNode(const sptr<WindowNode>& node) const
|
||||
{
|
||||
if (node == nullptr) {
|
||||
WLOGFE("IsAvoidAreaNode Failed, node is nullprt");
|
||||
WLOGFE("IsAvoidAreaNode Failed, node is nullptr");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ WMError AvoidAreaController::AvoidControl(const sptr<WindowNode>& node, AvoidCon
|
||||
WLOGFE("WinId:%{public}d is added. AvoidControl Add Failed. Type: %{public}u", windowId, type);
|
||||
return WMError::WM_ERROR_INVALID_PARAM;
|
||||
}
|
||||
// do not update or removew a unexist node
|
||||
// do not update or remove a non-exist node
|
||||
if (type != AvoidControlType::AVOID_NODE_ADD && iter == avoidNodes->end()) {
|
||||
WLOGFE("WinId:%{public}d not exist. AvoidControl Update or Remove Failed. Type: %{public}u", windowId, type);
|
||||
return WMError::WM_ERROR_INVALID_PARAM;
|
||||
@ -120,7 +120,7 @@ WMError AvoidAreaController::AvoidControl(const sptr<WindowNode>& node, AvoidCon
|
||||
return WMError::WM_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
// get all Area info and notify windowcontainer
|
||||
// get all Area info and notify window container
|
||||
std::vector<Rect> avoidAreas = GetAvoidArea(node->GetDisplayId());
|
||||
DumpAvoidArea(avoidAreas);
|
||||
UseCallbackNotifyAvoidAreaChanged(avoidAreas, node->GetDisplayId());
|
||||
|
@ -174,7 +174,7 @@ void DisplayGroupController::UpdateWindowShowingDisplays(const sptr<WindowNode>&
|
||||
void DisplayGroupController::UpdateWindowDisplayIdIfNeeded(const sptr<WindowNode>& node,
|
||||
const std::vector<DisplayId>& curShowingDisplays)
|
||||
{
|
||||
// current mutiDisplay is only support left-right combination, maxNum is two
|
||||
// current multi-display is only support left-right combination, maxNum is two
|
||||
DisplayId newDisplayId = node->GetDisplayId();
|
||||
if (curShowingDisplays.size() == 1) {
|
||||
newDisplayId = *(curShowingDisplays.begin());
|
||||
@ -232,7 +232,7 @@ void DisplayGroupController::PreProcessWindowNode(const sptr<WindowNode>& node,
|
||||
PreProcessWindowNode(childNode, type);
|
||||
}
|
||||
}
|
||||
WLOGFI("Current mode is not muti-display");
|
||||
WLOGFI("Current mode is not multi-display");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ void DisplayGroupController::MoveNotCrossNodeToDefaultDisplay(const sptr<WindowN
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayGroupController::ProcessNotCrossNodesOnDestroiedDisplay(DisplayId displayId,
|
||||
void DisplayGroupController::ProcessNotCrossNodesOnDestroyedDisplay(DisplayId displayId,
|
||||
std::vector<uint32_t>& windowIds)
|
||||
{
|
||||
if (displayId == defaultDisplayId_) {
|
||||
@ -333,11 +333,11 @@ void DisplayGroupController::ProcessNotCrossNodesOnDestroiedDisplay(DisplayId di
|
||||
if (node->GetDisplayId() != displayId || node->isShowingOnMultiDisplays_) {
|
||||
continue;
|
||||
}
|
||||
// destroy status and navigati
|
||||
// destroy status and navigation bar
|
||||
if (node->GetWindowType() == WindowType::WINDOW_TYPE_STATUS_BAR ||
|
||||
node->GetWindowType() == WindowType::WINDOW_TYPE_NAVIGATION_BAR) {
|
||||
windowNodeContainer_->DestroyWindowNode(node, windowIds);
|
||||
WLOGFI("destroy status or navigationbar on destroied display, windowId: %{public}d",
|
||||
WLOGFI("destroy status or navigation bar on destroyed display, windowId: %{public}d",
|
||||
node->GetWindowId());
|
||||
continue;
|
||||
}
|
||||
@ -380,11 +380,11 @@ void DisplayGroupController::ProcessDisplayDestroy(DisplayId defaultDisplayId, s
|
||||
windowNodeContainer_->GetAvoidController()->UpdateAvoidNodesMap(displayId, false);
|
||||
|
||||
// delete nodes and map element of deleted display
|
||||
ProcessNotCrossNodesOnDestroiedDisplay(displayId, windowIds);
|
||||
ProcessNotCrossNodesOnDestroyedDisplay(displayId, windowIds);
|
||||
// modify RSTree and window tree of displayGroup for cross-display nodes
|
||||
ProcessCrossNodes(defaultDisplayId, DisplayStateChangeType::DESTROY);
|
||||
UpdateDisplayGroupWindowTree();
|
||||
ClearMapOfDestroiedDisplay(displayId);
|
||||
ClearMapOfDestroyedDisplay(displayId);
|
||||
windowNodeContainer_->GetLayoutPolicy()->ProcessDisplayDestroy(displayId, displayRectMap);
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ void DisplayGroupController::ProcessDisplaySizeChangeOrRotation(DisplayId defaul
|
||||
windowNodeContainer_->GetLayoutPolicy()->ProcessDisplaySizeChangeOrRotation(displayId, displayRectMap);
|
||||
}
|
||||
|
||||
void DisplayGroupController::ClearMapOfDestroiedDisplay(DisplayId displayId)
|
||||
void DisplayGroupController::ClearMapOfDestroyedDisplay(DisplayId displayId)
|
||||
{
|
||||
sysBarTintMaps_.erase(displayId);
|
||||
sysBarNodeMaps_.erase(displayId);
|
||||
|
@ -96,7 +96,7 @@ void InputWindowMonitor::UpdateDisplayInfo(const sptr<DisplayInfo>& displayInfo,
|
||||
if (displayInfo->GetRotation() == Rotation::ROTATION_90 || displayInfo->GetRotation() == Rotation::ROTATION_270) {
|
||||
std::swap(displayWidth, displayHeight);
|
||||
}
|
||||
MMI::DisplayInfo diplay = {
|
||||
MMI::DisplayInfo display = {
|
||||
.id = static_cast<int32_t>(displayInfo->GetDisplayId()),
|
||||
.x = displayInfo->GetOffsetX(),
|
||||
.y = displayInfo->GetOffsetY(),
|
||||
@ -107,13 +107,13 @@ void InputWindowMonitor::UpdateDisplayInfo(const sptr<DisplayInfo>& displayInfo,
|
||||
.direction = GetDisplayDirectionForMmi(displayInfo->GetRotation()),
|
||||
};
|
||||
auto displayIter = std::find_if(displayInfoVector.begin(), displayInfoVector.end(),
|
||||
[&diplay](MMI::DisplayInfo& displayInfoTmp) {
|
||||
return displayInfoTmp.id == diplay.id;
|
||||
[&display](MMI::DisplayInfo& displayInfoTmp) {
|
||||
return displayInfoTmp.id == display.id;
|
||||
});
|
||||
if (displayIter != displayInfoVector.end()) {
|
||||
*displayIter = diplay;
|
||||
*displayIter = display;
|
||||
} else {
|
||||
displayInfoVector.emplace_back(diplay);
|
||||
displayInfoVector.emplace_back(display);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ WMError RemoteAnimation::NotifyAnimationTransition(sptr<WindowTransitionInfo> sr
|
||||
WLOGFE("RSWindowAnimation: no startingWindow for dst window id:%{public}u!", dstNode->GetWindowId());
|
||||
return WMError::WM_ERROR_NO_REMOTE_ANIMATION;
|
||||
}
|
||||
WLOGFI("RSWindowAnimation: nofity animation transition with dst currId:%{public}u!", dstNode->GetWindowId());
|
||||
WLOGFI("RSWindowAnimation: notify animation transition with dst currId:%{public}u!", dstNode->GetWindowId());
|
||||
sptr<RSWindowAnimationFinishedCallback> finishedCallback = new(std::nothrow) RSWindowAnimationFinishedCallback(
|
||||
[]() {
|
||||
WLOGFI("RSWindowAnimation: on finish transition with minimizeAll!");
|
||||
@ -173,7 +173,7 @@ WMError RemoteAnimation::NotifyAnimationMinimize(sptr<WindowTransitionInfo> srcI
|
||||
if (srcTarget == nullptr) {
|
||||
return WMError::WM_ERROR_NO_MEM;
|
||||
}
|
||||
WLOGFI("RSWindowAnimation: nofity animation minimize Id:%{public}u!", srcNode->GetWindowId());
|
||||
WLOGFI("RSWindowAnimation: notify animation minimize Id:%{public}u!", srcNode->GetWindowId());
|
||||
srcNode->isPlayAnimationHide_ = true;
|
||||
wptr<WindowNode> weak = srcNode;
|
||||
auto minimizeFunc = [weak]() {
|
||||
@ -203,7 +203,7 @@ WMError RemoteAnimation::NotifyAnimationClose(sptr<WindowTransitionInfo> srcInfo
|
||||
if (srcTarget == nullptr) {
|
||||
return WMError::WM_ERROR_NO_MEM;
|
||||
}
|
||||
WLOGFI("RSWindowAnimation: nofity animation close id:%{public}u!", srcNode->GetWindowId());
|
||||
WLOGFI("RSWindowAnimation: notify animation close id:%{public}u!", srcNode->GetWindowId());
|
||||
srcNode->isPlayAnimationHide_ = true;
|
||||
wptr<WindowNode> weak = srcNode;
|
||||
auto closeFunc = [weak, event]() {
|
||||
|
@ -35,7 +35,7 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowController"};
|
||||
constexpr uint32_t TOIUCH_HOT_AREA_MAX_NUM = 10;
|
||||
constexpr uint32_t TOUCH_HOT_AREA_MAX_NUM = 10;
|
||||
}
|
||||
|
||||
uint32_t WindowController::GenWindowId()
|
||||
@ -622,7 +622,7 @@ WMError WindowController::ProcessPointDown(uint32_t windowId, bool isStartDrag)
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
if (!node->currentVisibility_) {
|
||||
WLOGFE("this window is not visibile and not in window tree, windowId: %{public}u", windowId);
|
||||
WLOGFE("this window is not visible and not in window tree, windowId: %{public}u", windowId);
|
||||
return WMError::WM_ERROR_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
@ -690,13 +690,13 @@ WMError WindowController::ToggleShownStateForAllAppWindows()
|
||||
return windowRoot_->ToggleShownStateForAllAppWindows();
|
||||
}
|
||||
|
||||
WMError WindowController::MaxmizeWindow(uint32_t windowId)
|
||||
WMError WindowController::MaximizeWindow(uint32_t windowId)
|
||||
{
|
||||
WMError ret = SetWindowMode(windowId, WindowMode::WINDOW_MODE_FULLSCREEN);
|
||||
if (ret != WMError::WM_OK) {
|
||||
return ret;
|
||||
}
|
||||
ret = windowRoot_->MaxmizeWindow(windowId);
|
||||
ret = windowRoot_->MaximizeWindow(windowId);
|
||||
FlushWindowInfo(windowId);
|
||||
return ret;
|
||||
}
|
||||
@ -873,7 +873,7 @@ WMError WindowController::UpdateTouchHotAreas(const sptr<WindowNode>& node, cons
|
||||
node->GetWindowId(), static_cast<int32_t>(rects.size()), oss.str().c_str());
|
||||
Rect windowRect = node->GetWindowRect();
|
||||
std::vector<Rect> hotAreas;
|
||||
if (rects.size() > TOIUCH_HOT_AREA_MAX_NUM || !WindowHelper::CalculateTouchHotAreas(windowRect, rects, hotAreas)) {
|
||||
if (rects.size() > TOUCH_HOT_AREA_MAX_NUM || !WindowHelper::CalculateTouchHotAreas(windowRect, rects, hotAreas)) {
|
||||
return WMError::WM_ERROR_INVALID_PARAM;
|
||||
}
|
||||
node->GetWindowProperty()->SetTouchHotAreas(rects);
|
||||
|
@ -80,13 +80,13 @@ void WindowInnerManager::Stop()
|
||||
void WindowInnerManager::HandleCreateWindow(std::string name, WindowType type, Rect rect)
|
||||
{
|
||||
auto dialogCallback = [this](int32_t id, const std::string& event, const std::string& params) {
|
||||
if (params == "EVENT_CANCLE_CODE") {
|
||||
if (params == "EVENT_CANCEL_CODE") {
|
||||
Ace::UIServiceMgrClient::GetInstance()->CancelDialog(id);
|
||||
}
|
||||
};
|
||||
Ace::UIServiceMgrClient::GetInstance()->ShowDialog(name, dividerParams_, type,
|
||||
rect.posX_, rect.posY_, rect.width_, rect.height_, dialogCallback, &dialogId_);
|
||||
WLOGFI("create inner window id: %{public}d succes", dialogId_);
|
||||
WLOGFI("create inner window id: %{public}d success", dialogId_);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ void WindowLayoutPolicy::LimitWindowToBottomRightCorner(const sptr<WindowNode>&
|
||||
void WindowLayoutPolicy::UpdateDisplayGroupRect()
|
||||
{
|
||||
Rect newDisplayGroupRect = { 0, 0, 0, 0 };
|
||||
// current mutiDisplay is only support left-right combination, maxNum is two
|
||||
// current multi-display is only support left-right combination, maxNum is two
|
||||
for (auto& elem : displayGroupInfo_->GetAllDisplayRects()) {
|
||||
newDisplayGroupRect.posX_ = std::min(displayGroupRect_.posX_, elem.second.posX_);
|
||||
newDisplayGroupRect.posY_ = std::min(displayGroupRect_.posY_, elem.second.posY_);
|
||||
@ -151,10 +151,10 @@ void WindowLayoutPolicy::UpdateMultiDisplayFlag()
|
||||
{
|
||||
if (displayGroupInfo_->GetAllDisplayRects().size() > 1) {
|
||||
isMultiDisplay_ = true;
|
||||
WLOGFI("current mode is muti-display");
|
||||
WLOGFI("current mode is multi-display");
|
||||
} else {
|
||||
isMultiDisplay_ = false;
|
||||
WLOGFI("current mode is not muti-display");
|
||||
WLOGFI("current mode is not multi-display");
|
||||
}
|
||||
}
|
||||
|
||||
@ -534,8 +534,8 @@ FloatingWindowLimitsConfig WindowLayoutPolicy::GetCustomizedLimitsConfig(const R
|
||||
uint32_t configuredMaxHeight = static_cast<uint32_t>(floatingWindowLimitsConfig_.maxHeight_ * virtualPixelRatio);
|
||||
uint32_t configuredMinWidth = static_cast<uint32_t>(floatingWindowLimitsConfig_.minWidth_ * virtualPixelRatio);
|
||||
uint32_t configuredMinHeight = static_cast<uint32_t>(floatingWindowLimitsConfig_.minHeight_ * virtualPixelRatio);
|
||||
float configuerdMaxRatio = floatingWindowLimitsConfig_.maxRatio_;
|
||||
float configuerdMinRatio = floatingWindowLimitsConfig_.minRatio_;
|
||||
float configuredMaxRatio = floatingWindowLimitsConfig_.maxRatio_;
|
||||
float configuredMinRatio = floatingWindowLimitsConfig_.minRatio_;
|
||||
|
||||
// calculate new limit size
|
||||
if (systemLimits.minWidth_ <= configuredMaxWidth && configuredMaxWidth <= systemLimits.maxWidth_) {
|
||||
@ -556,11 +556,11 @@ FloatingWindowLimitsConfig WindowLayoutPolicy::GetCustomizedLimitsConfig(const R
|
||||
static_cast<float>(newLimitConfig.minHeight_);
|
||||
newLimitConfig.minRatio_ = static_cast<float>(newLimitConfig.minWidth_) /
|
||||
static_cast<float>(newLimitConfig.maxHeight_);
|
||||
if (newLimitConfig.minRatio_ <= configuerdMaxRatio && configuerdMaxRatio <= newLimitConfig.maxRatio_) {
|
||||
newLimitConfig.maxRatio_ = configuerdMaxRatio;
|
||||
if (newLimitConfig.minRatio_ <= configuredMaxRatio && configuredMaxRatio <= newLimitConfig.maxRatio_) {
|
||||
newLimitConfig.maxRatio_ = configuredMaxRatio;
|
||||
}
|
||||
if (newLimitConfig.minRatio_ <= configuerdMinRatio && configuerdMinRatio <= newLimitConfig.maxRatio_) {
|
||||
newLimitConfig.minRatio_ = configuerdMinRatio;
|
||||
if (newLimitConfig.minRatio_ <= configuredMinRatio && configuredMinRatio <= newLimitConfig.maxRatio_) {
|
||||
newLimitConfig.minRatio_ = configuredMinRatio;
|
||||
}
|
||||
|
||||
// recalculate limit size by new ratio
|
||||
@ -583,7 +583,7 @@ FloatingWindowLimitsConfig WindowLayoutPolicy::GetCustomizedLimitsConfig(const R
|
||||
return newLimitConfig;
|
||||
}
|
||||
|
||||
void WindowLayoutPolicy::UpdateFloatongWindowSizeForStretchableWindow(const sptr<WindowNode>& node,
|
||||
void WindowLayoutPolicy::UpdateFloatingWindowSizeForStretchableWindow(const sptr<WindowNode>& node,
|
||||
const Rect& displayRect, Rect& winRect) const
|
||||
{
|
||||
if (node->GetWindowSizeChangeReason() == WindowSizeChangeReason::DRAG) {
|
||||
@ -707,7 +707,7 @@ void WindowLayoutPolicy::LimitFloatingWindowSize(const sptr<WindowNode>& node,
|
||||
|
||||
if (node->GetStretchable() &&
|
||||
WindowHelper::IsMainFloatingWindow(node->GetWindowType(), node->GetWindowMode())) {
|
||||
UpdateFloatongWindowSizeForStretchableWindow(node, displayRect, winRect);
|
||||
UpdateFloatingWindowSizeForStretchableWindow(node, displayRect, winRect);
|
||||
}
|
||||
|
||||
// fix size in case of moving window when dragging
|
||||
@ -811,7 +811,7 @@ void WindowLayoutPolicy::LimitWindowPositionWhenInitRectOrMove(const sptr<Window
|
||||
uint32_t windowTitleBarH = static_cast<uint32_t>(WINDOW_TITLE_BAR_HEIGHT * virtualPixelRatio);
|
||||
|
||||
Rect limitRect;
|
||||
// if is corss-display window, the limit rect should be full limitRect
|
||||
// if is cross-display window, the limit rect should be full limitRect
|
||||
if (node->isShowingOnMultiDisplays_) {
|
||||
limitRect = displayGroupLimitRect_;
|
||||
} else {
|
||||
@ -994,7 +994,7 @@ void WindowLayoutPolicy::SetFloatingWindowLimitsConfig(const FloatingWindowLimit
|
||||
|
||||
Rect WindowLayoutPolicy::GetInitalDividerRect(DisplayId displayId) const
|
||||
{
|
||||
return IVALID_EMPTY_RECT;
|
||||
return INVALID_EMPTY_RECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ void WindowLayoutPolicyCascade::UpdateLayoutRect(const sptr<WindowNode>& node)
|
||||
if (!floatingWindow) { // fullscreen window
|
||||
winRect = limitRect;
|
||||
} else { // floating window
|
||||
if (subWindow && parentLimit) { // subwidow and limited by parent
|
||||
if (subWindow && parentLimit) { // subwindow and limited by parent
|
||||
limitRect = node->parent_->GetWindowRect();
|
||||
UpdateFloatingLayoutRect(limitRect, winRect);
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ void WindowLayoutPolicyTile::UpdateLayoutRect(const sptr<WindowNode>& node)
|
||||
WLOGFE("window property is nullptr.");
|
||||
return;
|
||||
}
|
||||
auto decorEnbale = property->GetDecorEnable();
|
||||
auto decorEnable = property->GetDecorEnable();
|
||||
bool needAvoid = (flags & static_cast<uint32_t>(WindowFlag::WINDOW_FLAG_NEED_AVOID));
|
||||
bool parentLimit = (flags & static_cast<uint32_t>(WindowFlag::WINDOW_FLAG_PARENT_LIMIT));
|
||||
bool subWindow = WindowHelper::IsSubWindow(type);
|
||||
@ -283,7 +283,7 @@ void WindowLayoutPolicyTile::UpdateLayoutRect(const sptr<WindowNode>& node)
|
||||
|
||||
WLOGFI("Id:%{public}u, avoid:%{public}d parLimit:%{public}d floating:%{public}d, sub:%{public}d, " \
|
||||
"deco:%{public}d, type:%{public}u, requestRect:[%{public}d, %{public}d, %{public}u, %{public}u]",
|
||||
node->GetWindowId(), needAvoid, parentLimit, floatingWindow, subWindow, decorEnbale,
|
||||
node->GetWindowId(), needAvoid, parentLimit, floatingWindow, subWindow, decorEnable,
|
||||
static_cast<uint32_t>(type), winRect.posX_, winRect.posY_, winRect.width_, winRect.height_);
|
||||
if (needAvoid) {
|
||||
limitRect = limitRectMap_[node->GetDisplayId()];
|
||||
@ -292,7 +292,7 @@ void WindowLayoutPolicyTile::UpdateLayoutRect(const sptr<WindowNode>& node)
|
||||
if (!floatingWindow) { // fullscreen window
|
||||
winRect = limitRect;
|
||||
} else { // floating window
|
||||
if (subWindow && parentLimit) { // subwidow and limited by parent
|
||||
if (subWindow && parentLimit) { // subwindow and limited by parent
|
||||
limitRect = node->parent_->GetWindowRect();
|
||||
UpdateFloatingLayoutRect(limitRect, winRect);
|
||||
}
|
||||
|
@ -541,11 +541,11 @@ WMError WindowManagerService::ToggleShownStateForAllAppWindows()
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
WMError WindowManagerService::MaxmizeWindow(uint32_t windowId)
|
||||
WMError WindowManagerService::MaximizeWindow(uint32_t windowId)
|
||||
{
|
||||
return wmsTaskLooper_->ScheduleTask([this, windowId]() {
|
||||
WM_SCOPED_TRACE("wms:MaxmizeWindow");
|
||||
return windowController_->MaxmizeWindow(windowId);
|
||||
WM_SCOPED_TRACE("wms:MaximizeWindow");
|
||||
return windowController_->MaximizeWindow(windowId);
|
||||
}).get();
|
||||
}
|
||||
|
||||
|
@ -55,14 +55,14 @@ WindowNodeContainer::WindowNodeContainer(const sptr<DisplayInfo>& displayInfo, S
|
||||
displayGroupController_->InitNewDisplay(displayId);
|
||||
|
||||
// init layout policy
|
||||
layoutPolicys_[WindowLayoutMode::CASCADE] = new WindowLayoutPolicyCascade(displayGroupInfo_,
|
||||
layoutPolicies_[WindowLayoutMode::CASCADE] = new WindowLayoutPolicyCascade(displayGroupInfo_,
|
||||
displayGroupController_->displayGroupWindowTree_);
|
||||
layoutPolicys_[WindowLayoutMode::TILE] = new WindowLayoutPolicyTile(displayGroupInfo_,
|
||||
layoutPolicies_[WindowLayoutMode::TILE] = new WindowLayoutPolicyTile(displayGroupInfo_,
|
||||
displayGroupController_->displayGroupWindowTree_);
|
||||
layoutPolicy_ = layoutPolicys_[WindowLayoutMode::CASCADE];
|
||||
layoutPolicy_ = layoutPolicies_[WindowLayoutMode::CASCADE];
|
||||
layoutPolicy_->Launch();
|
||||
|
||||
Rect initalDividerRect = layoutPolicys_[WindowLayoutMode::CASCADE]->GetInitalDividerRect(displayId);
|
||||
Rect initalDividerRect = layoutPolicies_[WindowLayoutMode::CASCADE]->GetInitalDividerRect(displayId);
|
||||
displayGroupController_->SetInitalDividerRect(displayId, initalDividerRect);
|
||||
// init avoidAreaController
|
||||
UpdateAvoidAreaFunc func = std::bind(&WindowNodeContainer::OnAvoidAreaChange, this,
|
||||
@ -300,7 +300,7 @@ WMError WindowNodeContainer::RemoveWindowNode(sptr<WindowNode>& node)
|
||||
UpdateWindowVisibilityInfos(infos);
|
||||
DumpScreenWindowTree();
|
||||
NotifyAccessibilityWindowInfo(node, WindowUpdateType::WINDOW_UPDATE_REMOVED);
|
||||
RcoveryScreenDefaultOrientationIfNeed(node->GetDisplayId());
|
||||
RecoverScreenDefaultOrientationIfNeed(node->GetDisplayId());
|
||||
if (node->GetWindowType() == WindowType::WINDOW_TYPE_KEYGUARD) {
|
||||
isScreenLocked_ = false;
|
||||
}
|
||||
@ -447,7 +447,7 @@ bool WindowNodeContainer::UpdateRSTree(sptr<WindowNode>& node, DisplayId display
|
||||
return true;
|
||||
}
|
||||
|
||||
void WindowNodeContainer::RcoveryScreenDefaultOrientationIfNeed(DisplayId displayId)
|
||||
void WindowNodeContainer::RecoverScreenDefaultOrientationIfNeed(DisplayId displayId)
|
||||
{
|
||||
if (displayGroupController_->displayGroupWindowTree_[displayId][WindowRootNodeType::APP_WINDOW_NODE]->empty()) {
|
||||
WLOGFI("appWindowNode_ child is empty in display %{public}" PRIu64"", displayId);
|
||||
@ -667,7 +667,7 @@ sptr<AvoidAreaController> WindowNodeContainer::GetAvoidController() const
|
||||
return avoidController_;
|
||||
}
|
||||
|
||||
sptr<DisplayGroupController> WindowNodeContainer::GetMutiDisplayController() const
|
||||
sptr<DisplayGroupController> WindowNodeContainer::GetMultiDisplayController() const
|
||||
{
|
||||
return displayGroupController_;
|
||||
}
|
||||
@ -923,7 +923,7 @@ void WindowNodeContainer::NotifyDockWindowStateChanged(sptr<WindowNode>& node, b
|
||||
if (windowNode->GetWindowId() == node->GetWindowId()) {
|
||||
continue;
|
||||
}
|
||||
if (!WindowHelper::IsFloatintWindow(windowNode->GetWindowMode())) {
|
||||
if (!WindowHelper::IsFloatingWindow(windowNode->GetWindowMode())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1526,7 +1526,7 @@ WMError WindowNodeContainer::SwitchLayoutPolicy(WindowLayoutMode dstMode, Displa
|
||||
}
|
||||
layoutMode_ = dstMode;
|
||||
layoutPolicy_->Clean();
|
||||
layoutPolicy_ = layoutPolicys_[dstMode];
|
||||
layoutPolicy_ = layoutPolicies_[dstMode];
|
||||
layoutPolicy_->Launch();
|
||||
DumpScreenWindowTree();
|
||||
} else {
|
||||
@ -1817,7 +1817,7 @@ WMError WindowNodeContainer::SetWindowMode(sptr<WindowNode>& node, WindowMode ds
|
||||
}
|
||||
windowPair->UpdateIfSplitRelated(node);
|
||||
if (WindowHelper::IsMainWindow(node->GetWindowType())) {
|
||||
if (WindowHelper::IsFloatintWindow(node->GetWindowMode())) {
|
||||
if (WindowHelper::IsFloatingWindow(node->GetWindowMode())) {
|
||||
NotifyDockWindowStateChanged(node, true);
|
||||
} else {
|
||||
NotifyDockWindowStateChanged(node, false);
|
||||
|
@ -226,7 +226,7 @@ bool WindowPair::IsSplitRelated(sptr<WindowNode>& node) const
|
||||
|
||||
std::vector<sptr<WindowNode>> WindowPair::GetOrderedPair(sptr<WindowNode>& node)
|
||||
{
|
||||
WLOGI("Get piared node in Z order");
|
||||
WLOGI("Get paired node in Z order");
|
||||
std::vector<sptr<WindowNode>> orderedPair;
|
||||
if (node == nullptr || Find(node) == nullptr) {
|
||||
return orderedPair;
|
||||
@ -368,7 +368,7 @@ void WindowPair::UpdateWindowPairStatus()
|
||||
status_ == WindowPairStatus::STATUS_PAIRING) {
|
||||
// create divider
|
||||
WindowInnerManager::GetInstance().CreateWindow("dialog_divider_ui", WindowType::WINDOW_TYPE_DOCK_SLICE,
|
||||
initalDivderRect_);
|
||||
initalDividerRect_);
|
||||
} else if ((prevStatus == WindowPairStatus::STATUS_PAIRED_DONE || prevStatus == WindowPairStatus::STATUS_PAIRING) &&
|
||||
(status_ != WindowPairStatus::STATUS_PAIRED_DONE && status_ != WindowPairStatus::STATUS_PAIRING)) {
|
||||
// clear pair
|
||||
@ -494,7 +494,7 @@ void WindowPair::SetAllAppWindowsRestoring(bool isAllAppWindowsRestoring)
|
||||
|
||||
void WindowPair::SetInitalDividerRect(const Rect& rect)
|
||||
{
|
||||
initalDivderRect_ = rect;
|
||||
initalDividerRect_ = rect;
|
||||
}
|
||||
} // namespace Rosen
|
||||
} // namespace OHOS
|
@ -89,7 +89,7 @@ sptr<WindowNodeContainer> WindowRoot::GetOrCreateWindowNodeContainer(DisplayId d
|
||||
sptr<WindowNodeContainer> WindowRoot::CreateWindowNodeContainer(sptr<DisplayInfo> displayInfo)
|
||||
{
|
||||
if (displayInfo == nullptr || !CheckDisplayInfo(displayInfo)) {
|
||||
WLOGFE("get display failed or get invailed display info");
|
||||
WLOGFE("get display failed or get invalid display info");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ WMError WindowRoot::ToggleShownStateForAllAppWindows()
|
||||
return res;
|
||||
}
|
||||
|
||||
WMError WindowRoot::MaxmizeWindow(uint32_t windowId)
|
||||
WMError WindowRoot::MaximizeWindow(uint32_t windowId)
|
||||
{
|
||||
auto node = GetWindowNode(windowId);
|
||||
if (node == nullptr) {
|
||||
@ -988,7 +988,7 @@ void WindowRoot::ProcessExpandDisplayCreate(DisplayId defaultDisplayId, sptr<Dis
|
||||
std::map<DisplayId, Rect>& displayRectMap)
|
||||
{
|
||||
if (displayInfo == nullptr || !CheckDisplayInfo(displayInfo)) {
|
||||
WLOGFE("get display failed or get invailed display info");
|
||||
WLOGFE("get display failed or get invalid display info");
|
||||
return;
|
||||
}
|
||||
DisplayId displayId = displayInfo->GetDisplayId();
|
||||
@ -999,7 +999,7 @@ void WindowRoot::ProcessExpandDisplayCreate(DisplayId defaultDisplayId, sptr<Dis
|
||||
}
|
||||
|
||||
WLOGFI("[Display Create] before add new display, displayId: %{public}" PRIu64"", displayId);
|
||||
container->GetMutiDisplayController()->ProcessDisplayCreate(defaultDisplayId, displayInfo, displayRectMap);
|
||||
container->GetMultiDisplayController()->ProcessDisplayCreate(defaultDisplayId, displayInfo, displayRectMap);
|
||||
WLOGFI("[Display Create] Container exist, add new display, displayId: %{public}" PRIu64"", displayId);
|
||||
}
|
||||
|
||||
@ -1111,20 +1111,20 @@ void WindowRoot::ProcessDisplayDestroy(DisplayId defaultDisplayId, sptr<DisplayI
|
||||
}
|
||||
WLOGFI("[Display Destroy] displayId: %{public}" PRIu64"", displayId);
|
||||
|
||||
std::vector<uint32_t> needDestoryWindows;
|
||||
std::vector<uint32_t> needDestroyWindows;
|
||||
auto displayRectMap = GetAllDisplayRectsByDisplayInfo(displayInfoMap);
|
||||
// erase displayId in displayRectMap
|
||||
auto displayRectIter = displayRectMap.find(displayId);
|
||||
displayRectMap.erase(displayRectIter);
|
||||
container->GetMutiDisplayController()->ProcessDisplayDestroy(
|
||||
defaultDisplayId, displayInfo, displayRectMap, needDestoryWindows);
|
||||
for (auto id : needDestoryWindows) {
|
||||
container->GetMultiDisplayController()->ProcessDisplayDestroy(
|
||||
defaultDisplayId, displayInfo, displayRectMap, needDestroyWindows);
|
||||
for (auto id : needDestroyWindows) {
|
||||
auto node = GetWindowNode(id);
|
||||
if (node != nullptr) {
|
||||
DestroyWindowInner(node);
|
||||
}
|
||||
}
|
||||
// move window which is not showing on destroied display to default display
|
||||
// move window which is not showing on destroyed display to default display
|
||||
MoveNotShowingWindowToDefaultDisplay(defaultDisplayId, displayId);
|
||||
WLOGFI("[Display Destroy] displayId: %{public}" PRIu64" ", displayId);
|
||||
}
|
||||
@ -1153,7 +1153,7 @@ void WindowRoot::ProcessDisplayChange(DisplayId defaultDisplayId, sptr<DisplayIn
|
||||
}
|
||||
|
||||
auto displayRectMap = GetAllDisplayRectsByDisplayInfo(displayInfoMap);
|
||||
container->GetMutiDisplayController()->ProcessDisplayChange(defaultDisplayId, displayInfo, displayRectMap, type);
|
||||
container->GetMultiDisplayController()->ProcessDisplayChange(defaultDisplayId, displayInfo, displayRectMap, type);
|
||||
}
|
||||
|
||||
float WindowRoot::GetVirtualPixelRatio(DisplayId displayId) const
|
||||
@ -1209,7 +1209,7 @@ void WindowRoot::SetSplitRatios(const std::vector<float>& splitRatioNumbers)
|
||||
}
|
||||
std::sort(splitRatios.begin(), splitRatios.end());
|
||||
auto iter = std::unique(splitRatios.begin(), splitRatios.end());
|
||||
splitRatios.erase(iter, splitRatios.end()); // remove duplitcate ratios
|
||||
splitRatios.erase(iter, splitRatios.end()); // remove duplicate ratios
|
||||
}
|
||||
|
||||
void WindowRoot::SetExitSplitRatios(const std::vector<float>& exitSplitRatios)
|
||||
|
@ -204,7 +204,7 @@ WMError WindowManagerProxy::SetAlpha(uint32_t windowId, float alpha)
|
||||
WLOGFE("Write alpha failed");
|
||||
return WMError::WM_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(WindowManagerMessage::TRANS_ID_SET_APLPHA),
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(WindowManagerMessage::TRANS_ID_SET_ALPHA),
|
||||
data, reply, option) != ERR_NONE) {
|
||||
return WMError::WM_ERROR_IPC_FAILED;
|
||||
}
|
||||
@ -432,7 +432,7 @@ WMError WindowManagerProxy::ToggleShownStateForAllAppWindows()
|
||||
return static_cast<WMError>(ret);
|
||||
}
|
||||
|
||||
WMError WindowManagerProxy::MaxmizeWindow(uint32_t windowId)
|
||||
WMError WindowManagerProxy::MaximizeWindow(uint32_t windowId)
|
||||
{
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
@ -445,7 +445,7 @@ WMError WindowManagerProxy::MaxmizeWindow(uint32_t windowId)
|
||||
WLOGFE("Write windowId failed");
|
||||
return WMError::WM_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(WindowManagerMessage::TRANS_ID_MAXMIZE_WINDOW),
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(WindowManagerMessage::TRANS_ID_MAXIMIZE_WINDOW),
|
||||
data, reply, option) != ERR_NONE) {
|
||||
return WMError::WM_ERROR_IPC_FAILED;
|
||||
}
|
||||
@ -542,7 +542,7 @@ WMError WindowManagerProxy::GetAccessibilityWindowInfo(sptr<AccessibilityWindowI
|
||||
WLOGFE("Write windowInfo failed");
|
||||
return WMError::WM_ERROR_IPC_FAILED;
|
||||
}
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(WindowManagerMessage::TRANS_ID_GET_ACCCESSIBILITY_WIDDOW_INFO_ID),
|
||||
if (Remote()->SendRequest(static_cast<uint32_t>(WindowManagerMessage::TRANS_ID_GET_ACCESSIBILITY_WINDOW_INFO_ID),
|
||||
data, reply, option) != ERR_NONE) {
|
||||
return WMError::WM_ERROR_IPC_FAILED;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ int32_t WindowManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, M
|
||||
reply.WriteInt32(static_cast<int32_t>(errCode));
|
||||
break;
|
||||
}
|
||||
case WindowManagerMessage::TRANS_ID_SET_APLPHA: {
|
||||
case WindowManagerMessage::TRANS_ID_SET_ALPHA: {
|
||||
uint32_t windowId = data.ReadUint32();
|
||||
float alpha = data.ReadFloat();
|
||||
WMError errCode = SetAlpha(windowId, alpha);
|
||||
@ -148,8 +148,8 @@ int32_t WindowManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, M
|
||||
reply.WriteInt32(static_cast<int32_t>(errCode));
|
||||
break;
|
||||
}
|
||||
case WindowManagerMessage::TRANS_ID_MAXMIZE_WINDOW: {
|
||||
MaxmizeWindow(data.ReadUint32());
|
||||
case WindowManagerMessage::TRANS_ID_MAXIMIZE_WINDOW: {
|
||||
MaximizeWindow(data.ReadUint32());
|
||||
break;
|
||||
}
|
||||
case WindowManagerMessage::TRANS_ID_UPDATE_LAYOUT_MODE: {
|
||||
@ -166,7 +166,7 @@ int32_t WindowManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, M
|
||||
reply.WriteInt32(static_cast<int32_t>(errCode));
|
||||
break;
|
||||
}
|
||||
case WindowManagerMessage::TRANS_ID_GET_ACCCESSIBILITY_WIDDOW_INFO_ID: {
|
||||
case WindowManagerMessage::TRANS_ID_GET_ACCESSIBILITY_WINDOW_INFO_ID: {
|
||||
sptr<AccessibilityWindowInfo> windowInfo = data.ReadParcelable<AccessibilityWindowInfo>();
|
||||
WMError errCode = GetAccessibilityWindowInfo(windowInfo);
|
||||
reply.WriteParcelable(windowInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user