Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(linux): stop the dialog blur from lagging Settings (#2495)

void19b6eb57a2e5
diff --git a/CLAUDE.md b/CLAUDE.md
index ff9b2d0e7..e62b44b2f 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -949,6 +949,7 @@ UI icons come from `src/components/icons/` (vendored Nucleo core outline compone
- No standardized URL scheme for system settings (user must open manually)
- Privacy settings button hidden in UI (not applicable on Linux)
- Recommend `pavucontrol` for audio device management
+- **Dialog overlays**: the full-window dialog overlays (shared `Dialog`, Settings, Ctrl+K, referral) skip their default backdrop blur on Linux (`ui/overlayBlur.ts`). Linux composites on the CPU (`--disable-gpu-compositing` in `main.js`), where a full-window blur is redrawn on every repaint inside the dialog (#2298); a blur passed through `overlayClassName` still applies
- **Launch at login**: XDG autostart entry at `~/.config/autostart/open-whispr.desktop` (see `linuxAutostart.js`), since Electron's `setLoginItemSettings()` does nothing on Linux
- Disabling it from GNOME Tweaks or KDE's autostart editor is reflected in the Settings toggle
- "Start minimized" is handled app-side by the `startMinimized` setting, not by the desktop entry
diff --git a/src/components/CommandSearch.tsx b/src/components/CommandSearch.tsx
index 2098281a0..be534d606 100644
--- a/src/components/CommandSearch.tsx
+++ b/src/components/CommandSearch.tsx
@@ -15,6 +15,7 @@ import {
} from "./icons";
import { cn } from "./lib/utils";
import { useDismissGuard } from "./ui/useDismissGuard";
+import { blurBehindOverlays } from "./ui/overlayBlur";
import {
DropdownMenu,
DropdownMenuTrigger,
@@ -328,7 +329,12 @@ export default function CommandSearch({
return (
<DialogPrimitive.Root open={open} onOpenChange={onOpenChange}>
<DialogPrimitive.Portal>
- <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" />
+ <DialogPrimitive.Overlay
+ className={cn(
+ "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ blurBehindOverlays && "backdrop-blur-sm"
+ )}
+ />
<DialogPrimitive.Content
ref={registerContent}
onInteractOutside={(e) => {
diff --git a/src/components/ReferralModal.tsx b/src/components/ReferralModal.tsx
index ef493791f..0bd2129a5 100644
--- a/src/components/ReferralModal.tsx
+++ b/src/components/ReferralModal.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "./icons";
import { cn } from "./lib/utils";
+import { blurBehindOverlays } from "./ui/overlayBlur";
import { ReferralDashboard } from "./ReferralDashboard";
interface ReferralModalProps {
@@ -17,7 +18,8 @@ export default function ReferralModal({ open, onOpenChange }: ReferralModalProps
<DialogPrimitive.Portal>
<DialogPrimitive.Overlay
className={cn(
- "fixed inset-0 z-50 bg-black/60 backdrop-blur-lg",
+ "fixed inset-0 z-50 bg-black/60",
+ blurBehindOverlays && "backdrop-blur-lg",
"data-[state=open]:animate-in data-[state=closed]:animate-out",
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
)}
diff --git a/src/components/ui/SidebarModal.tsx b/src/components/ui/SidebarModal.tsx
index 630255b55..af8387a51 100644
--- a/src/components/ui/SidebarModal.tsx
+++ b/src/components/ui/SidebarModal.tsx
@@ -2,6 +2,8 @@ import React from "react";
import { useTranslation } from "react-i18next";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "../icons";
+import { cn } from "../lib/utils";
+import { blurBehindOverlays } from "./overlayBlur";
import { InfoBox } from "./InfoBox";
import { SettingsLayoutProvider } from "./useSettingsLayout";
import { useDismissGuard } from "./useDismissGuard";
@@ -111,7 +113,12 @@ export default function SidebarModal<T extends string>({
return (
<DialogPrimitive.Root open={open} onOpenChange={onOpenChange}>
<DialogPrimitive.Portal>
- <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" />
+ <DialogPrimitive.Overlay
+ className={cn(
+ "fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ blurBehindOverlays && "backdrop-blur-sm"
+ )}
+ />
<DialogPrimitive.Content
ref={registerContent}
// Radix focuses the first tabbable on open, which is the close button;
diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx
index 5164b4f6a..24cd00160 100644
--- a/src/components/ui/dialog.tsx
+++ b/src/components/ui/dialog.tsx
@@ -3,6 +3,7 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "../icons";
import { cn } from "../lib/utils";
import { Button } from "./button";
+import { blurBehindOverlays } from "./overlayBlur";
import { useDismissGuard } from "./useDismissGuard";
const Dialog = DialogPrimitive.Root;
@@ -20,7 +21,8 @@ const DialogOverlay = React.forwardRef<
<DialogPrimitive.Overlay
ref={ref}
className={cn(
- "fixed inset-0 z-50 bg-black/60 backdrop-blur-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ "fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ blurBehindOverlays && "backdrop-blur-lg",
className
)}
{...props}
diff --git a/src/components/ui/overlayBlur.ts b/src/components/ui/overlayBlur.ts
new file mode 100644
index 000000000..b28d19faa
--- /dev/null
+++ b/src/components/ui/overlayBlur.ts
@@ -0,0 +1,6 @@
+import { getCachedPlatform } from "../../utils/platform";
+
+// Linux composites on the CPU (main.js passes --disable-gpu-compositing), where a blur
+// behind a full-window overlay is redrawn on every repaint inside the dialog: hover lags
+// and the GPU process pins a core (#2298). The scrim alone dims the page there.
+export const blurBehindOverlays = getCachedPlatform() !== "linux";