From 329a825fc9b0ed5ad2bb8deae77fa6392f864a3e Mon Sep 17 00:00:00 2001 From: zhengyongjie <15531316327@163.com> Date: Mon, 17 Jun 2024 11:52:15 +0800 Subject: [PATCH] =?UTF-8?q?launcher=E5=88=A0=E9=99=A4=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhengyongjie <15531316327@163.com> --- .../main/ets/default/manager/WindowManager.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/common/src/main/ets/default/manager/WindowManager.ts b/common/src/main/ets/default/manager/WindowManager.ts index cd0d9724..6d0404ce 100644 --- a/common/src/main/ets/default/manager/WindowManager.ts +++ b/common/src/main/ets/default/manager/WindowManager.ts @@ -321,24 +321,6 @@ class WindowManager { Log.showDebug(TAG, `${this.RECENT_WINDOW_NAME} setFullScreen`); }); }; - let registerWinEvent = (win: window.Window) => { - Log.showDebug(TAG, 'registerWinEvent Begin'); - win.on('windowEvent', (stageEventType) => { - Log.showDebug(TAG,`Recent lifeCycleEvent callback stageEventType=${stageEventType}`); - if (stageEventType === window.WindowEventType.WINDOW_INACTIVE) { - - Log.showDebug(TAG,'Recent MainAbility onWindowStageInactive'); - try { - let wins: window.Window = window.findWindow(windowManager.RECENT_WINDOW_NAME); - Log.showDebug(TAG,'Hide recent on inactive'); - wins.hide(); - } catch (err) { - let _err = err as BusinessError; - Log.showError(TAG, `Recent lifeCycleEvent findWindow errCode: ${_err.code}, errMsg: ${_err.message}`); - } - } - }) - }; try { let win: window.Window = window.findWindow(windowManager.RECENT_WINDOW_NAME); setWinMode(win); @@ -350,7 +332,6 @@ class WindowManager { Log.showDebug(TAG, `recent window is not created, because ${JSON.stringify(err)}`); let callback = (win) => { Log.showDebug(TAG, 'Post recent window created'); - registerWinEvent(win); setWinMode(win); } this.createWindow(globalThis.desktopContext, windowManager.RECENT_WINDOW_NAME, windowManager.RECENT_RANK,