mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-01 21:45:06 -04:00
@@ -366,8 +366,13 @@ void AbstractDisplayController::BindAloneScreenLocked(sptr<AbstractScreen> realA
|
||||
return;
|
||||
}
|
||||
if (dummyDisplay_ == nullptr) {
|
||||
sptr<AbstractDisplay> display = new AbstractDisplay(displayCount_.fetch_add(1),
|
||||
sptr<AbstractDisplay> display = new(std::nothrow) AbstractDisplay(displayCount_.fetch_add(1),
|
||||
realAbsScreen->dmsId_, info->width_, info->height_, info->refreshRate_);
|
||||
if (display == nullptr) {
|
||||
WLOGFE("create display failed");
|
||||
return;
|
||||
}
|
||||
|
||||
abstractDisplayMap_.insert((std::make_pair(display->GetId(), display)));
|
||||
WLOGI("create display for new screen. screen:%{public}" PRIu64", display:%{public}" PRIu64"",
|
||||
realAbsScreen->dmsId_, display->GetId());
|
||||
@@ -447,14 +452,14 @@ void AbstractDisplayController::SetFreeze(std::vector<DisplayId> displayIds, boo
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
auto iter = abstractDisplayMap_.find(displayId);
|
||||
if (iter == abstractDisplayMap_.end()) {
|
||||
WLOGI("setfreeze fail, cannot get display %{public}" PRIu64"", displayId);
|
||||
WLOGE("setfreeze fail, cannot get display %{public}" PRIu64"", displayId);
|
||||
continue;
|
||||
}
|
||||
abstractDisplay = iter->second;
|
||||
FreezeFlag curFlag = abstractDisplay->GetFreezeFlag();
|
||||
if ((toFreeze && (curFlag == FreezeFlag::FREEZING))
|
||||
|| (!toFreeze && (curFlag == FreezeFlag::UNFREEZING))) {
|
||||
WLOGI("setfreeze fail, display %{public}" PRIu64" freezeflag is %{public}u",
|
||||
WLOGE("setfreeze fail, display %{public}" PRIu64" freezeflag is %{public}u",
|
||||
displayId, curFlag);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,11 @@ bool AbstractScreenController::FillAbstractScreen(sptr<AbstractScreen>& absScree
|
||||
return false;
|
||||
}
|
||||
for (const RSScreenModeInfo& rsScreenModeInfo : allModes) {
|
||||
sptr<SupportedScreenModes> info = new SupportedScreenModes();
|
||||
sptr<SupportedScreenModes> info = new(std::nothrow) SupportedScreenModes();
|
||||
if (info == nullptr) {
|
||||
WLOGFE("create SupportedScreenModes failed");
|
||||
return false;
|
||||
}
|
||||
info->width_ = static_cast<uint32_t>(rsScreenModeInfo.GetScreenWidth());
|
||||
info->height_ = static_cast<uint32_t>(rsScreenModeInfo.GetScreenHeight());
|
||||
info->refreshRate_ = rsScreenModeInfo.GetScreenRefreshRate();
|
||||
|
||||
@@ -131,11 +131,17 @@ bool SurfaceReader::ProcessBuffer(const sptr<SurfaceBuffer> &buf)
|
||||
errno_t ret = memcpy_s(data + width * i * BPP, width * BPP, addr + stride * i, width * BPP);
|
||||
if (ret != EOK) {
|
||||
WLOGFE("memcpy failed");
|
||||
free(data);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
sptr<PixelMap> pixelMap = new PixelMap();
|
||||
sptr<PixelMap> pixelMap = new(std::nothrow) PixelMap();
|
||||
if (pixelMap == nullptr) {
|
||||
WLOGFE("create pixelMap failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
ImageInfo info;
|
||||
info.size.width = static_cast<int32_t>(width);
|
||||
info.size.height = static_cast<int32_t>(height);
|
||||
|
||||
+32
-32
@@ -365,7 +365,7 @@ WMError WindowImpl::SetUIContent(const std::string& contentInfo,
|
||||
WLOGFI("SetUIContent contentInfo: %{public}s", contentInfo.c_str());
|
||||
uiContent_ = Ace::UIContent::Create(context_.get(), engine);
|
||||
if (uiContent_ == nullptr) {
|
||||
WLOGFE("fail to SetUIContent id: %{public}d", property_->GetWindowId());
|
||||
WLOGFE("fail to SetUIContent id: %{public}u", property_->GetWindowId());
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
if (isdistributed) {
|
||||
@@ -401,7 +401,7 @@ std::string WindowImpl::GetContentInfo()
|
||||
{
|
||||
WLOGFI("GetContentInfo");
|
||||
if (uiContent_ == nullptr) {
|
||||
WLOGFE("fail to GetContentInfo id: %{public}d", property_->GetWindowId());
|
||||
WLOGFE("fail to GetContentInfo id: %{public}u", property_->GetWindowId());
|
||||
return "";
|
||||
}
|
||||
return uiContent_->GetContentInfo();
|
||||
@@ -454,7 +454,7 @@ void WindowImpl::DumpInfo(const std::vector<std::string>& params, std::vector<st
|
||||
|
||||
WMError WindowImpl::SetSystemBarProperty(WindowType type, const SystemBarProperty& property)
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d SetSystemBarProperty type %{public}d " \
|
||||
WLOGFI("[Client] Window %{public}u SetSystemBarProperty type %{public}d " \
|
||||
"enable:%{public}d, backgroundColor:%{public}x, contentColor:%{public}x ",
|
||||
property_->GetWindowId(), static_cast<uint32_t>(type), property.enable_,
|
||||
property.backgroundColor_, property.contentColor_);
|
||||
@@ -470,7 +470,7 @@ WMError WindowImpl::SetSystemBarProperty(WindowType type, const SystemBarPropert
|
||||
}
|
||||
WMError ret = UpdateProperty(PropertyChangeAction::ACTION_UPDATE_OTHER_PROPS);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("SetSystemBarProperty errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("SetSystemBarProperty errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
}
|
||||
return ret;
|
||||
@@ -478,27 +478,27 @@ WMError WindowImpl::SetSystemBarProperty(WindowType type, const SystemBarPropert
|
||||
|
||||
WMError WindowImpl::SetLayoutFullScreen(bool status)
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d SetLayoutFullScreen: %{public}d", property_->GetWindowId(), status);
|
||||
WLOGFI("[Client] Window %{public}u SetLayoutFullScreen: %{public}d", property_->GetWindowId(), status);
|
||||
if (!IsWindowValid()) {
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
WMError ret = SetWindowMode(WindowMode::WINDOW_MODE_FULLSCREEN);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("SetWindowMode errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("SetWindowMode errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
return ret;
|
||||
}
|
||||
if (status) {
|
||||
ret = RemoveWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("RemoveWindowFlag errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("RemoveWindowFlag errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
ret = AddWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("AddWindowFlag errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("AddWindowFlag errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
return ret;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ WMError WindowImpl::SetLayoutFullScreen(bool status)
|
||||
|
||||
WMError WindowImpl::SetFullScreen(bool status)
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d SetFullScreen: %{public}d", property_->GetWindowId(), status);
|
||||
WLOGFI("[Client] Window %{public}d SetFullScreen: %{public}u", property_->GetWindowId(), status);
|
||||
SystemBarProperty statusProperty = GetSystemBarPropertyByType(
|
||||
WindowType::WINDOW_TYPE_STATUS_BAR);
|
||||
SystemBarProperty naviProperty = GetSystemBarPropertyByType(
|
||||
@@ -522,17 +522,17 @@ WMError WindowImpl::SetFullScreen(bool status)
|
||||
}
|
||||
WMError ret = SetSystemBarProperty(WindowType::WINDOW_TYPE_STATUS_BAR, statusProperty);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("SetSystemBarProperty errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("SetSystemBarProperty errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
}
|
||||
ret = SetSystemBarProperty(WindowType::WINDOW_TYPE_NAVIGATION_BAR, naviProperty);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("SetSystemBarProperty errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("SetSystemBarProperty errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
}
|
||||
ret = SetLayoutFullScreen(status);
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("SetLayoutFullScreen errCode:%{public}d winId:%{public}d",
|
||||
WLOGFE("SetLayoutFullScreen errCode:%{public}d winId:%{public}u",
|
||||
static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
}
|
||||
return ret;
|
||||
@@ -549,7 +549,7 @@ void WindowImpl::MapFloatingWindowToAppIfNeeded()
|
||||
if (win->GetType() == WindowType::WINDOW_TYPE_APP_MAIN_WINDOW &&
|
||||
context_.get() == win->GetContext().get()) {
|
||||
appFloatingWindowMap_[win->GetWindowId()].push_back(this);
|
||||
WLOGFI("Map FloatingWindow %{public}d to AppMainWindow %{public}d", GetWindowId(), win->GetWindowId());
|
||||
WLOGFI("Map FloatingWindow %{public}u to AppMainWindow %{public}u", GetWindowId(), win->GetWindowId());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -693,7 +693,7 @@ WMError WindowImpl::Destroy(bool needNotifyServer)
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
WLOGFI("[Client] Window %{public}d Destroy", property_->GetWindowId());
|
||||
WLOGFI("[Client] Window %{public}u Destroy", property_->GetWindowId());
|
||||
InputTransferStation::GetInstance().RemoveInputWindow(this);
|
||||
WMError ret = WMError::WM_OK;
|
||||
if (needNotifyServer) {
|
||||
@@ -738,10 +738,10 @@ WMError WindowImpl::Show(uint32_t reason)
|
||||
}
|
||||
if (state_ == WindowState::STATE_SHOWN) {
|
||||
if (property_->GetWindowType() == WindowType::WINDOW_TYPE_DESKTOP) {
|
||||
WLOGFI("desktop window [id:%{public}d] is shown, minimize all app windows", property_->GetWindowId());
|
||||
WLOGFI("desktop window [id:%{public}u] is shown, minimize all app windows", property_->GetWindowId());
|
||||
SingletonContainer::Get<WindowAdapter>().MinimizeAllAppWindows(property_->GetDisplayId());
|
||||
} else {
|
||||
WLOGFI("window is already shown id: %{public}d, raise to top", property_->GetWindowId());
|
||||
WLOGFI("window is already shown id: %{public}u, raise to top", property_->GetWindowId());
|
||||
SingletonContainer::Get<WindowAdapter>().ProcessPointDown(property_->GetWindowId());
|
||||
}
|
||||
for (auto& listener : lifecycleListeners_) {
|
||||
@@ -759,14 +759,14 @@ WMError WindowImpl::Show(uint32_t reason)
|
||||
HandleKeepScreenOn(keepScreenOn_);
|
||||
HandleTurnScreenOn();
|
||||
} else {
|
||||
WLOGFE("show errCode:%{public}d for winId:%{public}d", static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
WLOGFE("show errCode:%{public}d for winId:%{public}u", static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
WMError WindowImpl::Hide(uint32_t reason)
|
||||
{
|
||||
WLOGFI("[Client] Window [name:%{public}s, id:%{public}d] Hide", name_.c_str(), property_->GetWindowId());
|
||||
WLOGFI("[Client] Window [name:%{public}s, id:%{public}u] Hide", name_.c_str(), property_->GetWindowId());
|
||||
if (!IsWindowValid()) {
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
@@ -777,12 +777,12 @@ WMError WindowImpl::Hide(uint32_t reason)
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
if (state_ == WindowState::STATE_HIDDEN || state_ == WindowState::STATE_CREATED) {
|
||||
WLOGFI("window is already hidden id: %{public}d", property_->GetWindowId());
|
||||
WLOGFI("window is already hidden id: %{public}u", property_->GetWindowId());
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
WMError ret = SingletonContainer::Get<WindowAdapter>().RemoveWindow(property_->GetWindowId());
|
||||
if (ret != WMError::WM_OK) {
|
||||
WLOGFE("hide errCode:%{public}d for winId:%{public}d", static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
WLOGFE("hide errCode:%{public}d for winId:%{public}u", static_cast<int32_t>(ret), property_->GetWindowId());
|
||||
return ret;
|
||||
}
|
||||
state_ = WindowState::STATE_HIDDEN;
|
||||
@@ -800,7 +800,7 @@ WMError WindowImpl::MoveTo(int32_t x, int32_t y)
|
||||
Rect rect = GetRect();
|
||||
Rect moveRect = { x, y, rect.width_, rect.height_ };
|
||||
if (state_ == WindowState::STATE_HIDDEN || state_ == WindowState::STATE_CREATED) {
|
||||
WLOGFI("window is hidden or created! id: %{public}d, oriPos: [%{public}d, %{public}d, "
|
||||
WLOGFI("window is hidden or created! id: %{public}u, oriPos: [%{public}d, %{public}d, "
|
||||
"movePos: [%{public}d, %{public}d]", property_->GetWindowId(), rect.posX_, rect.posY_, x, y);
|
||||
property_->SetWindowRect(moveRect);
|
||||
return WMError::WM_OK;
|
||||
@@ -819,7 +819,7 @@ WMError WindowImpl::Resize(uint32_t width, uint32_t height)
|
||||
Rect rect = GetRect();
|
||||
Rect resizeRect = { rect.posX_, rect.posY_, width, height };
|
||||
if (state_ == WindowState::STATE_HIDDEN || state_ == WindowState::STATE_CREATED) {
|
||||
WLOGFI("window is hidden or created! id: %{public}d, oriRect: [%{public}u, %{public}u], "
|
||||
WLOGFI("window is hidden or created! id: %{public}u, oriRect: [%{public}u, %{public}u], "
|
||||
"resizeRect: [%{public}u, %{public}u]", property_->GetWindowId(), rect.width_,
|
||||
rect.height_, width, height);
|
||||
property_->SetWindowRect(resizeRect);
|
||||
@@ -906,7 +906,7 @@ bool WindowImpl::IsDecorEnable() const
|
||||
|
||||
WMError WindowImpl::Maximize()
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d Maximize", property_->GetWindowId());
|
||||
WLOGFI("[Client] Window %{public}u Maximize", property_->GetWindowId());
|
||||
if (!IsWindowValid()) {
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
@@ -920,7 +920,7 @@ WMError WindowImpl::Maximize()
|
||||
|
||||
WMError WindowImpl::Minimize()
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d Minimize", property_->GetWindowId());
|
||||
WLOGFI("[Client] Window %{public}u Minimize", property_->GetWindowId());
|
||||
if (!IsWindowValid()) {
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
@@ -936,7 +936,7 @@ WMError WindowImpl::Minimize()
|
||||
|
||||
WMError WindowImpl::Recover()
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d Normalize", property_->GetWindowId());
|
||||
WLOGFI("[Client] Window %{public}u Normalize", property_->GetWindowId());
|
||||
if (!IsWindowValid()) {
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
@@ -948,7 +948,7 @@ WMError WindowImpl::Recover()
|
||||
|
||||
WMError WindowImpl::Close()
|
||||
{
|
||||
WLOGFI("[Client] Window %{public}d Close", property_->GetWindowId());
|
||||
WLOGFI("[Client] Window %{public}u Close", property_->GetWindowId());
|
||||
if (!IsWindowValid()) {
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
@@ -1471,7 +1471,7 @@ void WindowImpl::UpdateFocusStatus(bool focused)
|
||||
void WindowImpl::UpdateConfiguration(const std::shared_ptr<AppExecFwk::Configuration>& configuration)
|
||||
{
|
||||
if (uiContent_ != nullptr) {
|
||||
WLOGFD("notify ace winId:%{public}d", GetWindowId());
|
||||
WLOGFD("notify ace winId:%{public}u", GetWindowId());
|
||||
uiContent_->UpdateConfiguration(configuration);
|
||||
}
|
||||
if (subWindowMap_.count(GetWindowId()) == 0) {
|
||||
@@ -1484,7 +1484,7 @@ void WindowImpl::UpdateConfiguration(const std::shared_ptr<AppExecFwk::Configura
|
||||
|
||||
void WindowImpl::UpdateAvoidArea(const std::vector<Rect>& avoidArea)
|
||||
{
|
||||
WLOGFI("Window Update AvoidArea, id: %{public}d", property_->GetWindowId());
|
||||
WLOGFI("Window Update AvoidArea, id: %{public}u", property_->GetWindowId());
|
||||
for (auto& listener : avoidAreaChangeListeners_) {
|
||||
if (listener != nullptr) {
|
||||
listener->OnAvoidAreaChanged(avoidArea);
|
||||
@@ -1502,7 +1502,7 @@ void WindowImpl::UpdateWindowState(WindowState state)
|
||||
switch (state) {
|
||||
case WindowState::STATE_FROZEN: {
|
||||
if (abilityContext != nullptr && windowTag_ == WindowTag::MAIN_WINDOW) {
|
||||
WLOGFD("DoAbilityBackground KEYGUARD, id: %{public}d", GetWindowId());
|
||||
WLOGFD("DoAbilityBackground KEYGUARD, id: %{public}u", GetWindowId());
|
||||
AAFwk::AbilityManagerClient::GetInstance()->DoAbilityBackground(abilityContext->GetToken(),
|
||||
static_cast<uint32_t>(WindowStateChangeReason::KEYGUARD));
|
||||
} else {
|
||||
@@ -1514,7 +1514,7 @@ void WindowImpl::UpdateWindowState(WindowState state)
|
||||
}
|
||||
case WindowState::STATE_UNFROZEN: {
|
||||
if (abilityContext != nullptr && windowTag_ == WindowTag::MAIN_WINDOW) {
|
||||
WLOGFD("DoAbilityForeground KEYGUARD, id: %{public}d", GetWindowId());
|
||||
WLOGFD("DoAbilityForeground KEYGUARD, id: %{public}u", GetWindowId());
|
||||
AAFwk::AbilityManagerClient::GetInstance()->DoAbilityForeground(abilityContext->GetToken(),
|
||||
static_cast<uint32_t>(WindowStateChangeReason::KEYGUARD));
|
||||
} else {
|
||||
@@ -1545,7 +1545,7 @@ void WindowImpl::UpdateDragEvent(const PointInfo& point, DragEvent event)
|
||||
|
||||
void WindowImpl::UpdateDisplayId(DisplayId from, DisplayId to)
|
||||
{
|
||||
WLOGFD("update displayId. win %{public}d", GetWindowId());
|
||||
WLOGFD("update displayId. win %{public}u", GetWindowId());
|
||||
for (auto& listener : displayMoveListeners_) {
|
||||
if (listener != nullptr) {
|
||||
listener->OnDisplayMove(from, to);
|
||||
@@ -1556,7 +1556,7 @@ void WindowImpl::UpdateDisplayId(DisplayId from, DisplayId to)
|
||||
|
||||
void WindowImpl::UpdateOccupiedAreaChangeInfo(const sptr<OccupiedAreaChangeInfo>& info)
|
||||
{
|
||||
WLOGFI("Window Update OccupiedArea, id: %{public}d", property_->GetWindowId());
|
||||
WLOGFI("Window Update OccupiedArea, id: %{public}u", property_->GetWindowId());
|
||||
for (auto& listener : occupiedAreaChangeListeners_) {
|
||||
if (listener != nullptr) {
|
||||
listener->OnSizeChange(info);
|
||||
|
||||
@@ -33,7 +33,7 @@ void WindowInputChannel::HandleKeyEvent(std::shared_ptr<MMI::KeyEvent>& keyEvent
|
||||
WLOGFE("keyEvent is nullptr");
|
||||
return;
|
||||
}
|
||||
WLOGFI("Receive key event, windowId: %{public}d, keyCode: %{public}d",
|
||||
WLOGFI("Receive key event, windowId: %{public}u, keyCode: %{public}d",
|
||||
window_->GetWindowId(), keyEvent->GetKeyCode());
|
||||
bool isKeyboardEvent = IsKeyboardEvent(keyEvent);
|
||||
bool inputMethodHasProcessed = false;
|
||||
@@ -80,13 +80,13 @@ void WindowInputChannel::HandlePointerEvent(std::shared_ptr<MMI::PointerEvent>&
|
||||
pointerEvent->MarkProcessed();
|
||||
}
|
||||
}
|
||||
WLOGFI("Receive move event, windowId: %{public}d, action: %{public}d",
|
||||
WLOGFI("Receive move event, windowId: %{public}u, action: %{public}d",
|
||||
window_->GetWindowId(), pointerEvent->GetPointerAction());
|
||||
if (pointerEventTemp != nullptr) {
|
||||
pointerEventTemp->MarkProcessed();
|
||||
}
|
||||
} else {
|
||||
WLOGFI("Dispatch non-move event, windowId: %{public}d, action: %{public}d",
|
||||
WLOGFI("Dispatch non-move event, windowId: %{public}u, action: %{public}d",
|
||||
window_->GetWindowId(), pointerEvent->GetPointerAction());
|
||||
window_->ConsumePointerEvent(pointerEvent);
|
||||
pointerEvent->MarkProcessed();
|
||||
@@ -105,7 +105,7 @@ void WindowInputChannel::OnVsync(int64_t timeStamp)
|
||||
WLOGFE("moveEvent_ is nullptr");
|
||||
return;
|
||||
}
|
||||
WLOGFI("Dispatch move event, windowId: %{public}d, action: %{public}d",
|
||||
WLOGFI("Dispatch move event, windowId: %{public}u, action: %{public}d",
|
||||
window_->GetWindowId(), pointerEvent->GetPointerAction());
|
||||
window_->ConsumePointerEvent(pointerEvent);
|
||||
pointerEvent->MarkProcessed();
|
||||
@@ -119,7 +119,7 @@ void WindowInputChannel::SetInputListener(const std::shared_ptr<MMI::IInputEvent
|
||||
void WindowInputChannel::Destroy()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx_);
|
||||
WLOGFI("Destroy WindowInputChannel, windowId:%{public}d", window_->GetWindowId());
|
||||
WLOGFI("Destroy WindowInputChannel, windowId:%{public}u", window_->GetWindowId());
|
||||
isAvailable_ = false;
|
||||
VsyncStation::GetInstance().RemoveCallback(VsyncStation::CallbackType::CALLBACK_INPUT, callback_);
|
||||
if (moveEvent_ != nullptr) {
|
||||
|
||||
@@ -154,7 +154,7 @@ void WindowScene::UpdateConfiguration(const std::shared_ptr<AppExecFwk::Configur
|
||||
WLOGFE("mainWindow_ is null");
|
||||
return;
|
||||
}
|
||||
WLOGFI("notify mainWindow winId:%{public}d", mainWindow_->GetWindowId());
|
||||
WLOGFI("notify mainWindow winId:%{public}u", mainWindow_->GetWindowId());
|
||||
mainWindow_->UpdateConfiguration(configuration);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
||||
@@ -138,7 +138,7 @@ void InputWindowMonitor::TraverseWindowNodes(const std::vector<sptr<WindowNode>>
|
||||
iter->windowsInfo.clear();
|
||||
for (auto& windowNode: windowNodes) {
|
||||
if (windowTypeSkipped_.find(windowNode->GetWindowProperty()->GetWindowType()) != windowTypeSkipped_.end()) {
|
||||
WLOGFI("window has been skipped. [id: %{public}d, type: %{public}d]", windowNode->GetWindowId(),
|
||||
WLOGFI("window has been skipped. [id: %{public}u, type: %{public}d]", windowNode->GetWindowId(),
|
||||
windowNode->GetWindowProperty()->GetWindowType());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ void WindowLayoutPolicyCascade::LayoutWindowNode(sptr<WindowNode>& node)
|
||||
}
|
||||
if (node->parent_ != nullptr) { // isn't root node
|
||||
if (!node->currentVisibility_) {
|
||||
WLOGFI("window[%{public}d] currently not visible, no need layout", node->GetWindowId());
|
||||
WLOGFI("window[%{public}u] currently not visible, no need layout", node->GetWindowId());
|
||||
return;
|
||||
}
|
||||
UpdateLayoutRect(node);
|
||||
@@ -369,7 +369,7 @@ void WindowLayoutPolicyCascade::Reorder()
|
||||
node->SetWindowMode(WindowMode::WINDOW_MODE_FLOATING);
|
||||
node->GetWindowToken()->UpdateWindowMode(WindowMode::WINDOW_MODE_FLOATING);
|
||||
}
|
||||
WLOGFI("Cascade reorder Id: %{public}d, rect:[%{public}d, %{public}d, %{public}d, %{public}d]",
|
||||
WLOGFI("Cascade reorder Id: %{public}u, rect:[%{public}d, %{public}d, %{public}d, %{public}d]",
|
||||
node->GetWindowId(), rect.posX_, rect.posY_, rect.width_, rect.height_);
|
||||
}
|
||||
}
|
||||
@@ -381,7 +381,7 @@ Rect WindowLayoutPolicyCascade::GetCurCascadeRect(const sptr<WindowNode>& node)
|
||||
{
|
||||
Rect cascadeRect = {0, 0, 0, 0};
|
||||
for (auto iter = appWindowNode_->children_.rbegin(); iter != appWindowNode_->children_.rend(); iter++) {
|
||||
WLOGFI("GetCurCascadeRect id: %{public}d,", (*iter)->GetWindowId());
|
||||
WLOGFI("GetCurCascadeRect id: %{public}u,", (*iter)->GetWindowId());
|
||||
if ((*iter)->GetWindowType() != WindowType::WINDOW_TYPE_DOCK_SLICE &&
|
||||
(*iter)->GetWindowId() != node->GetWindowId()) {
|
||||
auto property = (*iter)->GetWindowProperty();
|
||||
|
||||
@@ -123,7 +123,7 @@ void WindowLayoutPolicyTile::UpdateWindowNode(sptr<WindowNode>& node, bool isAdd
|
||||
void WindowLayoutPolicyTile::RemoveWindowNode(sptr<WindowNode>& node)
|
||||
{
|
||||
WM_FUNCTION_TRACE();
|
||||
WLOGFI("RemoveWindowNode %{public}d in tile", node->GetWindowId());
|
||||
WLOGFI("RemoveWindowNode %{public}u in tile", node->GetWindowId());
|
||||
auto type = node->GetWindowType();
|
||||
// affect other windows, trigger off global layout
|
||||
if (avoidTypes_.find(type) != avoidTypes_.end()) {
|
||||
@@ -169,13 +169,13 @@ void WindowLayoutPolicyTile::ForegroundNodeQueuePushBack(sptr<WindowNode>& node)
|
||||
if (node == nullptr) {
|
||||
return;
|
||||
}
|
||||
WLOGFI("add win in tile for win id: %{public}d", node->GetWindowId());
|
||||
WLOGFI("add win in tile for win id: %{public}u", node->GetWindowId());
|
||||
while (foregroundNodes_.size() >= maxTileWinNum_) {
|
||||
auto removeNode = foregroundNodes_.front();
|
||||
foregroundNodes_.pop_front();
|
||||
WLOGFI("pop win in queue head id: %{public}d, for add new win", removeNode->GetWindowId());
|
||||
WLOGFI("pop win in queue head id: %{public}u, for add new win", removeNode->GetWindowId());
|
||||
if (removeNode->abilityToken_ != nullptr) {
|
||||
WLOGFI("minimize win %{public}d in tile", removeNode->GetWindowId());
|
||||
WLOGFI("minimize win %{public}u in tile", removeNode->GetWindowId());
|
||||
AAFwk::AbilityManagerClient::GetInstance()->MinimizeAbility(removeNode->abilityToken_);
|
||||
}
|
||||
}
|
||||
@@ -189,7 +189,7 @@ void WindowLayoutPolicyTile::ForegroundNodeQueueRemove(sptr<WindowNode>& node)
|
||||
}
|
||||
auto iter = std::find(foregroundNodes_.begin(), foregroundNodes_.end(), node);
|
||||
if (iter != foregroundNodes_.end()) {
|
||||
WLOGFI("remove win in tile for win id: %{public}d", node->GetWindowId());
|
||||
WLOGFI("remove win in tile for win id: %{public}u", node->GetWindowId());
|
||||
foregroundNodes_.erase(iter);
|
||||
}
|
||||
}
|
||||
@@ -214,7 +214,7 @@ void WindowLayoutPolicyTile::AssignNodePropertyForTileWindows()
|
||||
node->GetWindowToken()->UpdateWindowMode(WindowMode::WINDOW_MODE_FLOATING);
|
||||
node->SetWindowRect(rect);
|
||||
node->hasDecorated_ = true;
|
||||
WLOGFI("set rect for qwin id: %{public}d [%{public}d %{public}d %{public}d %{public}d]",
|
||||
WLOGFI("set rect for qwin id: %{public}u [%{public}d %{public}d %{public}d %{public}d]",
|
||||
node->GetWindowId(), rect.posX_, rect.posY_, rect.width_, rect.height_);
|
||||
rectIt++;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ void WindowLayoutPolicyTile::UpdateLayoutRect(sptr<WindowNode>& node)
|
||||
Rect limitRect = displayRect;
|
||||
Rect winRect = node->GetWindowProperty()->GetWindowRect();
|
||||
|
||||
WLOGFI("Id:%{public}d, avoid:%{public}d parLimit:%{public}d floating:%{public}d, sub:%{public}d, " \
|
||||
WLOGFI("Id:%{public}u, avoid:%{public}d parLimit:%{public}d floating:%{public}d, sub:%{public}d, " \
|
||||
"deco:%{public}d, type:%{public}d, requestRect:[%{public}d, %{public}d, %{public}d, %{public}d]",
|
||||
node->GetWindowId(), needAvoid, parentLimit, floatingWindow, subWindow, decorEnbale,
|
||||
static_cast<uint32_t>(type), winRect.posX_, winRect.posY_, winRect.width_, winRect.height_);
|
||||
|
||||
@@ -133,7 +133,7 @@ WMError WindowManagerService::AddWindow(sptr<WindowProperty>& property)
|
||||
"%{public}4d %{public}4d]", windowId, property->GetWindowType(), property->GetWindowMode(),
|
||||
property->GetWindowFlags(), rect.posX_, rect.posY_, rect.width_, rect.height_);
|
||||
|
||||
WM_SCOPED_TRACE("wms:AddWindow(%d)", windowId);
|
||||
WM_SCOPED_TRACE("wms:AddWindow(%u)", windowId);
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
WMError res = windowController_->AddWindowNode(property);
|
||||
if (property->GetWindowType() == WindowType::WINDOW_TYPE_DRAGGING_EFFECT) {
|
||||
|
||||
@@ -140,7 +140,7 @@ WMError WindowNodeContainer::AddWindowNode(sptr<WindowNode>& node, sptr<WindowNo
|
||||
UpdateWindowVisibilityInfos(infos);
|
||||
DumpScreenWindowTree();
|
||||
NotifyAccessibilityWindowInfo(node, WindowUpdateType::WINDOW_UPDATE_ADDED);
|
||||
WLOGFI("AddWindowNode windowId: %{public}d end", node->GetWindowId());
|
||||
WLOGFI("AddWindowNode windowId: %{public}u end", node->GetWindowId());
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ WMError WindowNodeContainer::UpdateWindowNode(sptr<WindowNode>& node, WindowUpda
|
||||
NotifyIfSystemBarTintChanged();
|
||||
}
|
||||
DumpScreenWindowTree();
|
||||
WLOGFI("UpdateWindowNode windowId: %{public}d end", node->GetWindowId());
|
||||
WLOGFI("UpdateWindowNode windowId: %{public}u end", node->GetWindowId());
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
@@ -173,14 +173,14 @@ void WindowNodeContainer::UpdateSizeChangeReason(sptr<WindowNode>& node, WindowS
|
||||
childNode->GetWindowToken()->UpdateWindowRect(childNode->GetLayoutRect(), reason);
|
||||
childNode->ResetWindowSizeChangeReason();
|
||||
WLOGFI("Notify split window that the drag action is start or end, windowId: %{public}d, "
|
||||
"reason: %{public}d", childNode->GetWindowId(), reason);
|
||||
"reason: %{public}u", childNode->GetWindowId(), reason);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
node->GetWindowToken()->UpdateWindowRect(node->GetLayoutRect(), reason);
|
||||
node->ResetWindowSizeChangeReason();
|
||||
WLOGFI("Notify window that the drag action is start or end, windowId: %{public}d, "
|
||||
"reason: %{public}d", node->GetWindowId(), reason);
|
||||
"reason: %{public}u", node->GetWindowId(), reason);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ WMError WindowNodeContainer::RemoveWindowNode(sptr<WindowNode>& node)
|
||||
UpdateWindowVisibilityInfos(infos);
|
||||
DumpScreenWindowTree();
|
||||
NotifyAccessibilityWindowInfo(node, WindowUpdateType::WINDOW_UPDATE_REMOVED);
|
||||
WLOGFI("RemoveWindowNode windowId: %{public}d end", node->GetWindowId());
|
||||
WLOGFI("RemoveWindowNode windowId: %{public}u end", node->GetWindowId());
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ void WindowNodeContainer::RaiseOrderedWindowToTop(std::vector<uint32_t> orderedI
|
||||
sptr<WindowNode> node = *iter;
|
||||
iter = windowNodes.erase(iter);
|
||||
UpdateWindowTree(node);
|
||||
WLOGFI("raise group window to top %{public}d", node->GetWindowId());
|
||||
WLOGFI("raise group window to top %{public}u", node->GetWindowId());
|
||||
} else {
|
||||
iter++;
|
||||
}
|
||||
@@ -637,7 +637,7 @@ void WindowNodeContainer::RaiseWindowToTop(uint32_t windowId, std::vector<sptr<W
|
||||
sptr<WindowNode> node = *iter;
|
||||
windowNodes.erase(iter);
|
||||
UpdateWindowTree(node);
|
||||
WLOGFI("raise window to top %{public}d", node->GetWindowId());
|
||||
WLOGFI("raise window to top %{public}u", node->GetWindowId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -873,7 +873,7 @@ WMError WindowNodeContainer::RaiseZOrderForAppWindow(sptr<WindowNode>& node, spt
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
if (IsTopAppWindow(node->GetWindowId())) {
|
||||
WLOGFI("it is already top app window, id: %{public}d", node->GetWindowId());
|
||||
WLOGFI("it is already top app window, id: %{public}u", node->GetWindowId());
|
||||
return WMError::WM_ERROR_INVALID_TYPE;
|
||||
}
|
||||
if (WindowHelper::IsSubWindow(node->GetWindowType())) {
|
||||
@@ -1048,11 +1048,11 @@ WMError WindowNodeContainer::MinimizeAppNodeExceptOptions(bool fromUser, const s
|
||||
WMError WindowNodeContainer::EnterSplitWindowMode(sptr<WindowNode>& node)
|
||||
{
|
||||
WM_FUNCTION_TRACE();
|
||||
WLOGFI("Enter split window mode: %{public}d", node->GetWindowId());
|
||||
WLOGFI("Enter split window mode: %{public}u", node->GetWindowId());
|
||||
SwitchLayoutPolicy(WindowLayoutMode::CASCADE); // window split mode is belong to cascade
|
||||
auto pairNode = FindSplitPairNode(node);
|
||||
if (pairNode != nullptr) {
|
||||
WLOGFI("Window %{public}d find pair %{public}d", node->GetWindowId(), pairNode->GetWindowId());
|
||||
WLOGFI("Window %{public}d find pair %{public}u", node->GetWindowId(), pairNode->GetWindowId());
|
||||
WMError ret = UpdateWindowPairInfo(node, pairNode);
|
||||
if (ret != WMError::WM_OK) {
|
||||
return ret;
|
||||
@@ -1081,7 +1081,7 @@ void WindowNodeContainer::ResetLayoutPolicy()
|
||||
WMError WindowNodeContainer::ExitSplitWindowMode(sptr<WindowNode>& node)
|
||||
{
|
||||
WM_FUNCTION_TRACE();
|
||||
WLOGFI("exit split window mode %{public}d", node->GetWindowId());
|
||||
WLOGFI("exit split window mode %{public}u", node->GetWindowId());
|
||||
node->GetWindowProperty()->ResumeLastWindowMode();
|
||||
node->GetWindowToken()->UpdateWindowMode(node->GetWindowMode());
|
||||
if (pairedWindowMap_.count(node->GetWindowId()) != 0) {
|
||||
@@ -1090,11 +1090,11 @@ WMError WindowNodeContainer::ExitSplitWindowMode(sptr<WindowNode>& node)
|
||||
pairNode->GetWindowToken()->UpdateWindowMode(pairNode->GetWindowMode());
|
||||
pairedWindowMap_.erase(pairNode->GetWindowId());
|
||||
pairedWindowMap_.erase(node->GetWindowId());
|
||||
WLOGFI("resume pair node mode, Id[%{public}d, %{public}d], Mode[%{public}d, %{public}d]", node->GetWindowId(),
|
||||
WLOGFI("resume pair node mode, Id[%{public}u, %{public}u], Mode[%{public}d, %{public}d]", node->GetWindowId(),
|
||||
pairNode->GetWindowId(), node->GetWindowMode(), pairNode->GetWindowMode());
|
||||
}
|
||||
if (pairedWindowMap_.empty()) {
|
||||
WLOGFI("send destroy msg to divider, Id: %{public}d", node->GetWindowId());
|
||||
WLOGFI("send destroy msg to divider, Id: %{public}u", node->GetWindowId());
|
||||
SingletonContainer::Get<WindowInnerManager>().SendMessage(INNER_WM_DESTROY_DIVIDER, displayId_);
|
||||
}
|
||||
ResetLayoutPolicy();
|
||||
@@ -1116,7 +1116,7 @@ WMError WindowNodeContainer::UpdateWindowPairInfo(sptr<WindowNode>& triggerNode,
|
||||
WLOGFE("Update window pair info failed");
|
||||
return ret;
|
||||
}
|
||||
WLOGFI("Pair FullScreen [%{public}d, %{public}d], Mode[%{public}d, %{public}d], splitRatio = %{public}f",
|
||||
WLOGFI("Pair FullScreen [%{public}u, %{public}u], Mode[%{public}d, %{public}d], splitRatio = %{public}f",
|
||||
triggerNode->GetWindowId(), pairNode->GetWindowId(), triggerMode, pairDstMode, splitRatio);
|
||||
} else {
|
||||
if (pairedWindowMap_.count(pairNode->GetWindowId()) != 0) {
|
||||
@@ -1199,17 +1199,17 @@ void WindowNodeContainer::MoveWindowNode(sptr<WindowNodeContainer>& container)
|
||||
WLOGFI("disconnect expand display: %{public}" PRId64 ", move window node to display: "
|
||||
"%{public}" PRId64 "", from, displayId_);
|
||||
for (auto& node : container->aboveAppWindowNode_->children_) {
|
||||
WLOGFI("aboveAppWindowNode_: move windowNode: %{public}d", node->GetWindowId());
|
||||
WLOGFI("aboveAppWindowNode_: move windowNode: %{public}u", node->GetWindowId());
|
||||
aboveAppWindowNode_->children_.push_back(node);
|
||||
layoutPolicy_->AddWindowNode(node);
|
||||
}
|
||||
for (auto& node : container->appWindowNode_->children_) {
|
||||
WLOGFI("appWindowNode_: move windowNode: %{public}d", node->GetWindowId());
|
||||
WLOGFI("appWindowNode_: move windowNode: %{public}u", node->GetWindowId());
|
||||
appWindowNode_->children_.push_back(node);
|
||||
layoutPolicy_->AddWindowNode(node);
|
||||
}
|
||||
for (auto& node : container->belowAppWindowNode_->children_) {
|
||||
WLOGFI("belowAppWindowNode_: move windowNode: %{public}d", node->GetWindowId());
|
||||
WLOGFI("belowAppWindowNode_: move windowNode: %{public}u", node->GetWindowId());
|
||||
belowAppWindowNode_->children_.push_back(node);
|
||||
layoutPolicy_->AddWindowNode(node);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ WMError WindowRoot::SaveWindow(const sptr<WindowNode>& node)
|
||||
WLOGFE("add window failed, node is nullptr");
|
||||
return WMError::WM_ERROR_NULLPTR;
|
||||
}
|
||||
WLOGFI("save windowId %{public}d", node->GetWindowId());
|
||||
WLOGFI("save windowId %{public}u", node->GetWindowId());
|
||||
windowNodeMap_.insert(std::make_pair(node->GetWindowId(), node));
|
||||
auto remoteObject = node->GetWindowToken()->AsObject();
|
||||
windowIdMap_.insert(std::make_pair(remoteObject, node->GetWindowId()));
|
||||
|
||||
@@ -47,8 +47,7 @@ int32_t SnapshotProxy::GetSnapshot(const sptr<IRemoteObject> &token, AAFwk::Snap
|
||||
|
||||
std::shared_ptr<Media::PixelMap> pixelMap(reply.ReadParcelable<Media::PixelMap>());
|
||||
snapshot.SetPixelMap(pixelMap);
|
||||
int32_t ret = reply.ReadInt32();
|
||||
return ret;
|
||||
return reply.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user