mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 12:35:22 -04:00
fix expand screen bug
Signed-off-by: youqijing <youqijing@huawei.com> Change-Id: Ieae48a618896ab0b48b2dc9b41ef4b300dc75a62
This commit is contained in:
@@ -184,9 +184,10 @@ void AbstractDisplayController::ProcessExpandScreenDisconnected(
|
||||
", screenId: %{public}" PRIu64"", displayId, abstractDisplay->GetAbstractScreenId());
|
||||
// Notify disconnect event to WMS
|
||||
DisplayManagerService::GetInstance().NotifyDisplayStateChange(displayId, DisplayStateChangeType::DESTROY);
|
||||
abstractDisplayMap_.erase(iter);
|
||||
// Notify disconnect event to DisplayManager
|
||||
DisplayManagerAgentController::GetInstance().OnDisplayDestroy(abstractDisplay->GetId());
|
||||
abstractDisplayMap_.erase(iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -257,6 +257,10 @@ void WindowController::NotifyDisplayStateChange(DisplayId displayId, DisplayStat
|
||||
ProcessDisplayChange(displayId, type);
|
||||
break;
|
||||
}
|
||||
case DisplayStateChangeType::DESTROY: {
|
||||
windowRoot_->NotifyDisplayDestory(displayId);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
WLOGFE("unknown DisplayStateChangeType:%{public}u", type);
|
||||
return;
|
||||
@@ -292,10 +296,6 @@ void WindowController::ProcessDisplayChange(DisplayId displayId, DisplayStateCha
|
||||
WLOGFI("display w/h: %{public}u %{public}u", abstractDisplay->GetWidth(), abstractDisplay->GetHeight());
|
||||
break;
|
||||
}
|
||||
case DisplayStateChangeType::DESTROY: {
|
||||
windowRoot_->NotifyDisplayDestory(displayId);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
WLOGFE("unknown DisplayStateChangeType:%{public}u", type);
|
||||
return;
|
||||
|
||||
@@ -970,25 +970,23 @@ void WindowNodeContainer::RaiseInputMethodWindowPriorityIfNeeded(const sptr<Wind
|
||||
|
||||
void WindowNodeContainer::MoveWindowNode(sptr<WindowNodeContainer>& container)
|
||||
{
|
||||
WLOGFI("MoveWindowNode: disconnect expand display, move window node");
|
||||
WLOGFI("MoveWindowNode: disconnect expand display: %{public}" PRId64 ", move window node to display: "
|
||||
"%{public}" PRId64 "", container->GetDisplayId(), displayId_);
|
||||
sptr<WindowNode> belowAppNode = container->GetBelowAppWindowNode();
|
||||
sptr<WindowNode> appNode = container->GetAppWindowNode();
|
||||
sptr<WindowNode> aboveAppNode = container->GetAboveAppWindowNode();
|
||||
for (auto& node : belowAppNode->children_) {
|
||||
WLOGFI("belowAppWindowNode_: move windowNode: {public}%d from displayId: %{public}" PRId64 ""
|
||||
" to displayID %{public}" PRId64 "", node->GetWindowId(), node->GetDisplayId(), displayId_);
|
||||
WLOGFI("belowAppWindowNode_: move windowNode: {public}%d", node->GetWindowId());
|
||||
node->SetDisplayId(displayId_);
|
||||
belowAppWindowNode_->children_.push_back(node);
|
||||
}
|
||||
for (auto& node : appNode->children_) {
|
||||
WLOGFI("appWindowNode_: move windowNode: {public}%d from displayId: %{public}" PRId64 ""
|
||||
" to displayID %{public}" PRId64 "", node->GetWindowId(), node->GetDisplayId(), displayId_);
|
||||
WLOGFI("appWindowNode_: move windowNode: {public}%d", node->GetWindowId());
|
||||
node->SetDisplayId(displayId_);
|
||||
appWindowNode_->children_.push_back(node);
|
||||
}
|
||||
for (auto& node : aboveAppNode->children_) {
|
||||
WLOGFI("aboveAppWindowNode_: move windowNode: {public}%d from displayId: %{public}" PRId64 ""
|
||||
" to displayID %{public}" PRId64 "", node->GetWindowId(), node->GetDisplayId(), displayId_);
|
||||
WLOGFI("aboveAppWindowNode_: move windowNode: {public}%d", node->GetWindowId());
|
||||
node->SetDisplayId(displayId_);
|
||||
aboveAppWindowNode_->children_.push_back(node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user