Lines Matching refs:container

84     auto container = GetWindowNodeContainer(displayId);
85 if (container != nullptr) {
86 return container;
89 // In case of have no container for default display, create container
90 WLOGI("Create container for current display, displayId: %{public}" PRIu64 "", displayId);
102 // if container exist for screenGroup and display is not be recorded, process expand display
127 WLOGI("create new container for display, width: %{public}d, height: %{public}d, "
130 sptr<WindowNodeContainer> container = new WindowNodeContainer(displayInfo, displayGroupId);
131 windowNodeContainerMap_.insert(std::make_pair(displayGroupId, container));
134 if (container == nullptr) {
135 WLOGFE("create container failed, displayId :%{public}" PRIu64 "", displayId);
138 container->GetDisplayGroupController()->SetSplitRatioConfig(splitRatioConfig_);
139 return container;
179 wptr<WindowNodeContainer> container = GetWindowNodeContainer(it.second->GetDisplayId());
180 if (container == nullptr) {
184 [container](const std::map<uint64_t, sptr<WindowNodeContainer>>::value_type& containerPair) {
185 return container.promote() == containerPair.second;
285 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
286 if (container == nullptr) {
287 WLOGFE("MinimizeAbility failed, window container could not be found");
290 return container->MinimizeStructuredAppWindowsExceptSelf(node);
312 auto container = GetOrCreateWindowNodeContainer(displayId);
313 if (container == nullptr) {
316 auto displayGroupController = container->GetDisplayGroupController();
329 auto container = const_cast<WindowRoot*>(this)->GetOrCreateWindowNodeContainer(displayId);
330 if (container == nullptr) {
331 WLOGFE("can't find container");
334 return container->IsForbidDockSliceMove(displayId);
339 auto container = const_cast<WindowRoot*>(this)->GetOrCreateWindowNodeContainer(displayId);
340 if (container == nullptr) {
341 WLOGFE("can't find container");
344 return container->IsDockSliceInExitSplitModeArea(displayId);
349 auto container = GetOrCreateWindowNodeContainer(displayId);
350 if (container == nullptr) {
351 WLOGFE("can't find container");
354 container->ExitSplitMode(displayId);
529 sptr<WindowNodeContainer> container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
530 if (container == nullptr) {
531 WLOGFE("add window failed, window container could not be found");
534 return container->GetAvoidAreaByType(node, avoidAreaType);
539 auto container = GetOrCreateWindowNodeContainer(displayId);
540 if (container == nullptr) {
541 WLOGFE("can't find window node container, failed!");
544 return container->MinimizeAllAppWindows(displayId);
553 auto container = GetOrCreateWindowNodeContainer(displayId);
554 if (container == nullptr) {
555 WLOGFE("can't find window node container, failed!");
558 containers.emplace_back(container);
559 isAllAppWindowsEmpty = isAllAppWindowsEmpty && container->IsAppWindowsEmpty();
563 [this, isAllAppWindowsEmpty, &res] (sptr<WindowNodeContainer> container) {
588 WMError tmpRes = container->ToggleShownStateForAllAppWindows(restoreFunc, isAllAppWindowsEmpty);
610 sptr<WindowNodeContainer>& container)
622 container->RaiseZOrderForAppWindow(parentNode, parent);
626 sptr<WindowNode> focusWin = GetWindowNode(container->GetFocusWindow());
630 container->SetFocusWindow(node->GetWindowId());
631 container->DumpScreenWindowTree();
636 container->SetActiveWindow(node->GetWindowId(), false);
654 auto topRotatableWindow = container->GetNextRotatableWindow(INVALID_WINDOW_ID);
656 container->SetDisplayOrientationFromWindow(node, true);
662 container->TraverseContainer(windowNodes);
675 bool WindowRoot::CheckAddingModeAndSize(sptr<WindowNode>& node, const sptr<WindowNodeContainer>& container)
681 if (WindowHelper::IsInvalidWindowInTileLayoutMode(node->GetModeSupportInfo(), container->GetCurrentLayoutMode())) {
686 WMError res = container->IsTileRectSatisfiedWithSizeLimits(node);
704 auto container = GetOrCreateWindowNodeContainer(displayId);
705 if (container == nullptr) {
706 WLOGFE("failed, window container could not be found");
763 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
764 if (container == nullptr) {
765 WLOGFE("add window failed, window container could not be found");
769 if (!CheckAddingModeAndSize(node, container)) { // true means stop adding
774 container->LayoutWhenAddWindowNode(node, afterAnimation);
798 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
799 if (container == nullptr) {
803 if (!CheckAddingModeAndSize(node, container)) { // true means stop adding
824 WMError res = container->ShowStartingWindow(node);
831 container->NotifyDockWindowStateChanged(node, false);
834 uint32_t mainWindowNumber = container->GetWindowCountByType(WindowType::WINDOW_TYPE_APP_MAIN_WINDOW);
836 container->MinimizeOldestAppWindow();
846 res = container->AddWindowNode(node, parentNode);
851 return PostProcessAddWindowNode(node, parentNode, container);
862 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
863 if (container == nullptr) {
864 WLOGFE("failed, window container could not be found");
867 container->DropShowWhenLockedWindowIfNeeded(node);
868 UpdateFocusWindowWithWindowRemoved(node, container);
869 UpdateActiveWindowWithWindowRemoved(node, container);
870 UpdateBrightnessWithWindowRemoved(windowId, container);
871 WMError res = container->RemoveWindowNode(node, fromAnimation);
884 container->TraverseContainer(windowNodes);
903 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
904 if (container == nullptr) {
905 WLOGFE("[FixOrientation] failed, window container could not be found");
908 auto nextRotatableWindow = container->GetNextRotatableWindow(node->GetWindowId());
911 container->SetDisplayOrientationFromWindow(nextRotatableWindow, false);
934 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
935 if (container == nullptr) {
936 WLOGFE("update window failed, window container could not be found");
940 auto ret = container->UpdateWindowNode(node, reason);
954 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
955 if (container == nullptr) {
956 WLOGFE("failed, window container could not be found");
959 container->UpdateSizeChangeReason(node, reason);
970 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
971 if (container == nullptr) {
972 WLOGFE("failed, window container could not be found");
979 if (windowId != container->GetActiveWindow()) {
984 if (std::fabs(container->GetDisplayBrightness() - brightness) > std::numeric_limits<float>::min()) {
989 container->SetDisplayBrightness(brightness);
992 if (std::fabs(container->GetDisplayBrightness() - brightness) > std::numeric_limits<float>::min()) {
993 WLOGFI("value: %{public}u", container->ToOverrideBrightness(brightness));
996 container->ToOverrideBrightness(brightness));
998 container->SetDisplayBrightness(brightness);
1001 container->SetBrightnessWindow(windowId);
1011 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1012 if (container == nullptr) {
1013 WLOGFE("failed, window container could not be found");
1016 container->HandleKeepScreenOn(node, requireLock);
1026 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1027 if (container == nullptr) {
1028 WLOGFE("failed, window container could not be found");
1032 if (windowId != container->GetFocusWindow() || node->GetWindowProperty()->GetFocusable()) {
1035 auto nextFocusableWindow = container->GetNextFocusableWindow(windowId);
1038 container->SetFocusWindow(nextFocusableWindow->GetWindowId());
1044 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1045 if (container == nullptr) {
1046 WLOGFE("failed, window container could not be found");
1053 auto res = container->SetWindowMode(node, dstMode);
1054 auto nextRotatableWindow = container->GetNextRotatableWindow(0);
1062 WMError WindowRoot::DestroyWindowSelf(sptr<WindowNode>& node, const sptr<WindowNodeContainer>& container)
1075 WMError res = container->DestroyWindowNode(node, windowIds);
1082 WMError WindowRoot::DestroyWindowWithChild(sptr<WindowNode>& node, const sptr<WindowNodeContainer>& container)
1086 WMError res = container->DestroyWindowNode(node, windowIds);
1110 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1111 if (!container) {
1112 WLOGFW("failed, window container could not be found");
1116 UpdateFocusWindowWithWindowRemoved(node, container);
1117 UpdateActiveWindowWithWindowRemoved(node, container);
1118 UpdateBrightnessWithWindowRemoved(windowId, container);
1121 return DestroyWindowSelf(node, container);
1123 return DestroyWindowWithChild(node, container);
1178 const sptr<WindowNodeContainer>& container) const
1180 if (node == nullptr || container == nullptr) {
1189 uint32_t focusedWindowId = container->GetFocusWindow();
1191 container->DumpScreenWindowTree();
1208 auto nextFocusableWindow = container->GetNextFocusableWindow(windowId);
1211 container->SetFocusWindow(nextFocusableWindow->GetWindowId());
1214 container->SetFocusWindow(INVALID_WINDOW_ID);
1219 const sptr<WindowNodeContainer>& container) const
1221 if (node == nullptr || container == nullptr) {
1226 uint32_t activeWindowId = container->GetActiveWindow();
1244 auto nextActiveWindow = container->GetNextActiveWindow(windowId);
1247 container->SetActiveWindow(nextActiveWindow->GetWindowId(), true);
1251 void WindowRoot::UpdateBrightnessWithWindowRemoved(uint32_t windowId, const sptr<WindowNodeContainer>& container) const
1253 if (container == nullptr) {
1254 WLOGFE("window container could not be found");
1257 if (windowId == container->GetBrightnessWindow()) {
1258 WLOGFD("winId: %{public}u", container->GetActiveWindow());
1259 container->UpdateBrightness(container->GetActiveWindow(), true);
1265 auto container = const_cast<WindowRoot*>(this)->GetOrCreateWindowNodeContainer(node->GetDisplayId());
1266 if (container == nullptr) {
1267 WLOGFE("get display direction failed, window container could not be found");
1270 return container->IsVerticalDisplay(node->GetDisplayId());
1284 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1285 if (container == nullptr) {
1286 WLOGFE("window container could not be found");
1290 return container->SetFocusWindow(windowId);
1306 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1307 if (container == nullptr) {
1308 WLOGFE("window container could not be found");
1311 auto res = container->SetActiveWindow(windowId, false);
1375 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1376 if (container == nullptr) {
1377 WLOGFW("window container could not be found");
1380 container->RaiseSplitRelatedWindowToTop(node);
1384 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1385 if (container == nullptr) {
1386 WLOGFW("window container could not be found");
1391 container->RaiseZOrderForAppWindow(node, parentNode);
1400 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1401 if (container == nullptr) {
1402 WLOGFW("add window failed, window container could not be found");
1407 return container->RaiseZOrderForAppWindow(node, parentNode);
1412 sptr<WindowNodeContainer> container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1413 if (container == nullptr) {
1414 WLOGFW("window container could not be found");
1418 container->TraverseContainer(windowNodes);
1479 auto container = GetOrCreateWindowNodeContainer(displayId);
1480 if (container == nullptr) {
1481 WLOGFE("window container could not be found");
1484 WMError ret = container->SwitchLayoutPolicy(mode, displayId, true);
1582 auto container = windowNodeContainerMap_[displayGroupId];
1583 if (container == nullptr) {
1584 WLOGFE("window node container is nullptr, displayId :%{public}" PRIu64 "", displayId);
1588 container->GetDisplayGroupController()->ProcessDisplayCreate(defaultDisplayId, displayInfo, displayRectMap);
1589 container->GetDisplayGroupController()->SetSplitRatioConfig(splitRatioConfig_);
1637 WLOGI("Create new container for display, displayId: %{public}" PRIu64"", displayId);
1686 // container process display destroy
1687 auto container = iter->second;
1688 if (container == nullptr) {
1689 WLOGFE("window node container is nullptr, displayId :%{public}" PRIu64 "", displayId);
1702 container->GetDisplayGroupController()->ProcessDisplayDestroy(
1731 // container process display change
1732 auto container = iter->second;
1733 if (container == nullptr) {
1734 WLOGFE("window node container is nullptr, displayId :%{public}" PRIu64 "", displayId);
1739 container->GetDisplayGroupController()->ProcessDisplayChange(defaultDisplayId, displayInfo, displayRectMap, type);
1745 auto container = const_cast<WindowRoot*>(this)->GetOrCreateWindowNodeContainer(displayId);
1746 if (container == nullptr) {
1747 WLOGFE("window container could not be found");
1750 return container->GetDisplayGroupRect();
1755 auto container = GetWindowNodeContainer(displayId);
1756 return container != nullptr ? container->HasPrivateWindow() : false;
1761 auto container = GetWindowNodeContainer(displayId);
1762 return container != nullptr ? container->HasMainFullScreenWindowShown() : false;
1803 auto container = GetOrCreateWindowNodeContainer(displayId);
1804 if (container == nullptr) {
1805 WLOGFE("GetModeChangeHotZones failed, window container could not be found");
1808 container->GetModeChangeHotZones(displayId, hotZones, config);
1816 sptr<WindowNodeContainer> container = GetOrCreateWindowNodeContainer(id);
1817 if (container == nullptr) {
1818 WLOGW("get container failed %{public}" PRIu64"", id);
1821 container->RemoveSingleUserWindowNodes(accountId);
1832 auto container = GetOrCreateWindowNodeContainer(node->GetDisplayId());
1833 if (container == nullptr) {
1834 WLOGFE("window container could not be found");
1839 container->AddNodeOnRSTree(node, displayId, displayId, WindowUpdateType::WINDOW_UPDATE_ACTIVE);
1841 container->RemoveNodeFromRSTree(node, displayId, displayId, WindowUpdateType::WINDOW_UPDATE_ACTIVE);
1902 auto container = GetWindowNodeContainer(displayId);
1903 return container == nullptr ? false : container->TakeWindowPairSnapshot(displayId);
1908 auto container = GetWindowNodeContainer(displayId);
1909 if (container == nullptr) {
1910 WLOGFE("clear window pair snapshot failed, because container in null");
1913 return container->ClearWindowPairSnapshot(displayId);
1924 auto container = containerPair.second;
1925 if (container == nullptr) {
1929 container->TraverseContainer(allWindowNode);