From a03831f2a2f07ac3a2a77dfa29ac5362e35f26b5 Mon Sep 17 00:00:00 2001 From: pengx17 Date: Mon, 5 Aug 2024 14:09:22 +0000 Subject: [PATCH] fix(electron): whitescreen issue (#7742) 1. non-blurred mode whitescreen issue 2. should not close tab with cmd+w for pinned tabs --- packages/frontend/electron/renderer/global.css | 4 ++++ .../frontend/electron/src/main/windows-manager/tab-views.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/electron/renderer/global.css b/packages/frontend/electron/renderer/global.css index 30fff067cb..89a08a6758 100644 --- a/packages/frontend/electron/renderer/global.css +++ b/packages/frontend/electron/renderer/global.css @@ -14,6 +14,10 @@ html { opacity: 0; } +html[data-active='true'] { + opacity: 1; +} + html:is([data-active='false'], [data-dragging='true']) * { -webkit-app-region: no-drag !important; } diff --git a/packages/frontend/electron/src/main/windows-manager/tab-views.ts b/packages/frontend/electron/src/main/windows-manager/tab-views.ts index 4b997a52b8..9e92770ef4 100644 --- a/packages/frontend/electron/src/main/windows-manager/tab-views.ts +++ b/packages/frontend/electron/src/main/windows-manager/tab-views.ts @@ -316,7 +316,7 @@ export class WebContentViewsManager { }; closeTab = async (id?: string) => { - if (!id) { + if (!id && !this.activeWorkbenchMeta?.pinned) { id = this.activeWorkbenchId; }