From 8475f42821d1c4489ddb1ed664eba374b1794189 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:17:38 +0400 Subject: [PATCH] refactor: improve titlebar interactions on macos --- src/components/ui/dialog.tsx | 13 ++++++++----- src/components/window-drag-area.tsx | 15 +++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index ee2d460..ed8a27c 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -5,6 +5,7 @@ import type * as React from "react"; import { RxCross2 } from "react-icons/rx"; import { cn } from "@/lib/utils"; +import { WindowDragArea } from "../window-drag-area"; function Dialog({ ...props @@ -38,11 +39,13 @@ function DialogOverlay({ + > + + ); } @@ -57,7 +60,7 @@ function DialogContent({ ); @@ -115,7 +118,7 @@ function DialogDescription({ return ( ); diff --git a/src/components/window-drag-area.tsx b/src/components/window-drag-area.tsx index 0eee23e..7879144 100644 --- a/src/components/window-drag-area.tsx +++ b/src/components/window-drag-area.tsx @@ -33,7 +33,7 @@ export function WindowDragArea() { void startDrag(); }; - // Only render on macOS + // Only render on macOS and when no dialogs are open if (!isMacOS) { return null; } @@ -41,20 +41,11 @@ export function WindowDragArea() { return (