From 1e8821c65bf709d174eedef8b63dbce193c27911 Mon Sep 17 00:00:00 2001 From: zhangjie Date: Fri, 15 Dec 2023 14:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUIExtensionWindow=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=9B=B4=E6=96=B0=E5=B8=A7=E7=8E=87=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=B0RS=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangjie Change-Id: I00385b03d3cc5c12f7558a6e0b5e531063b2d07d --- wm/src/window_session_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wm/src/window_session_impl.cpp b/wm/src/window_session_impl.cpp index c59d916c10..90ec4b8272 100644 --- a/wm/src/window_session_impl.cpp +++ b/wm/src/window_session_impl.cpp @@ -1194,7 +1194,7 @@ void WindowSessionImpl::NotifyAfterForeground(bool needNotifyListeners, bool nee if (needNotifyUiContent) { CALL_UI_CONTENT(Foreground); } - if (WindowHelper::IsMainWindow(GetType())) { + if (WindowHelper::IsMainWindow(GetType()) || WindowHelper::IsUIExtensionWindow(GetType())) { VsyncStation::GetInstance().SetFrameRateLinkerEnable(true); } } @@ -1209,7 +1209,7 @@ void WindowSessionImpl::NotifyAfterBackground(bool needNotifyListeners, bool nee if (needNotifyUiContent) { CALL_UI_CONTENT(Background); } - if (WindowHelper::IsMainWindow(GetType())) { + if (WindowHelper::IsMainWindow(GetType()) || WindowHelper::IsUIExtensionWindow(GetType())) { VsyncStation::GetInstance().SetFrameRateLinkerEnable(false); } } @@ -1849,7 +1849,7 @@ int64_t WindowSessionImpl::GetVSyncPeriod() void WindowSessionImpl::FlushFrameRate(uint32_t rate) { std::lock_guard lock(mutex_); - if (WindowHelper::IsMainWindow(GetType())) { + if (WindowHelper::IsMainWindow(GetType()) || WindowHelper::IsUIExtensionWindow(GetType())) { VsyncStation::GetInstance().FlushFrameRate(rate); } } -- Gitee