From ab6b668ec24743e9de2e6c1c29401da475e98cf7 Mon Sep 17 00:00:00 2001 From: JoeJoeflyn Date: Wed, 29 Jul 2026 20:45:27 +0700 Subject: [PATCH] fix(desktop): disable backdrop-blur on Linux for perf (#3328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linux WebKitGTK has no GPU-accelerated backdrop-filter path. With 16+ backdrop-blur layers visible, each frame re-blurs all backdrops in software, blocking the main thread — causing sluggish UI and slow loading. Tag with platform-linux class and neutralize backdrop-filter on Linux, falling back to the opaque bg-* colors every blur element already carries. Signed-off-by: JoeJoeflyn --- desktop/src/main.tsx | 8 ++++++++ desktop/src/shared/styles/globals/motion.css | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/desktop/src/main.tsx b/desktop/src/main.tsx index 890ef72226..58a17bbf32 100644 --- a/desktop/src/main.tsx +++ b/desktop/src/main.tsx @@ -14,6 +14,7 @@ import { PoofBurstProvider } from "@/shared/ui/PoofBurstProvider"; import { Toaster } from "@/shared/ui/sonner"; import { TooltipProvider } from "@/shared/ui/tooltip"; import { recoverLocalStorageQuotaOnStartup } from "@/shared/lib/localStorageQuota"; +import { isLinuxPlatform } from "@/shared/lib/platform"; type E2eWindow = Window & { __BUZZ_E2E__?: unknown; @@ -108,9 +109,16 @@ async function installE2eBridgeIfConfigured() { maybeInstallE2eTauriMocks(); } +function tagPlatformClass() { + if (isLinuxPlatform()) { + document.documentElement.classList.add("platform-linux"); + } +} + async function bootstrap() { resetDevWebviewStateFromUrl(); configureDevE2eBridgeFromUrl(); + tagPlatformClass(); recoverLocalStorageQuotaOnStartup(); await installE2eBridgeIfConfigured(); await migrateLegacyCommunityStorageBeforeRender(); diff --git a/desktop/src/shared/styles/globals/motion.css b/desktop/src/shared/styles/globals/motion.css index 25288fb1a6..f20a92a58f 100644 --- a/desktop/src/shared/styles/globals/motion.css +++ b/desktop/src/shared/styles/globals/motion.css @@ -117,3 +117,9 @@ ::view-transition-new(root) { animation: none; } + +/* Linux WebKitGTK has no GPU-accelerated backdrop-filter — disable it. */ +.platform-linux * { + backdrop-filter: none !important; + -webkit-backdrop-filter: none !important; +}