mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 20:45:26 -04:00
修复通知ace窗口模式bug
Signed-off-by: xingyanan <xingyanan2@huawei.com> Change-Id: I21827624de09115459203b8fc3dc85390fb41f06 Signed-off-by: xingyanan <xingyanan2@huawei.com>
This commit is contained in:
+5
-14
@@ -264,23 +264,14 @@ WMError WindowImpl::SetWindowMode(WindowMode mode)
|
||||
return WMError::WM_ERROR_INVALID_WINDOW;
|
||||
}
|
||||
if (state_ == WindowState::STATE_CREATED || state_ == WindowState::STATE_HIDDEN) {
|
||||
property_->SetWindowMode(mode);
|
||||
UpdateMode(mode);
|
||||
} else if (state_ == WindowState::STATE_SHOWN) {
|
||||
property_->SetWindowMode(mode);
|
||||
WMError ret = SingletonContainer::Get<WindowAdapter>().SetWindowMode(property_->GetWindowId(), mode);
|
||||
if (ret == WMError::WM_OK) {
|
||||
WLOGFD("notify window mode changed");
|
||||
for (auto& listener : windowChangeListeners_) {
|
||||
if (listener != nullptr) {
|
||||
listener->OnModeChange(mode);
|
||||
}
|
||||
}
|
||||
if (uiContent_ != nullptr) {
|
||||
uiContent_->UpdateWindowMode(mode);
|
||||
WLOGFI("notify uiContent window mode change end");
|
||||
}
|
||||
if (ret != WMError::WM_OK) {
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
// set client window mode if success.
|
||||
UpdateMode(mode);
|
||||
}
|
||||
if (property_->GetWindowMode() != mode) {
|
||||
WLOGFE("set window mode filed! id: %{public}d", property_->GetWindowId());
|
||||
|
||||
@@ -214,6 +214,7 @@ WMError WindowController::SetWindowMode(uint32_t windowId, WindowMode dstMode)
|
||||
WLOGFE("Set window mode failed, update node failed");
|
||||
return res;
|
||||
}
|
||||
node->GetWindowToken()->UpdateWindowMode(node->GetWindowMode());
|
||||
FlushWindowInfo(windowId);
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user