From 8d1c126460a4cc6a7b4dbe7ad38d5d35e9ff86a7 Mon Sep 17 00:00:00 2001 From: Cooper-X-Oak Date: Fri, 1 May 2026 16:16:06 +0800 Subject: [PATCH 1/4] fix(windows): remove native titlebar before first show --- openless-all/app/src-tauri/src/lib.rs | 11 ++++++++--- openless-all/app/src-tauri/tauri.conf.json | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/openless-all/app/src-tauri/src/lib.rs b/openless-all/app/src-tauri/src/lib.rs index 4d7b9f10..ca55937b 100644 --- a/openless-all/app/src-tauri/src/lib.rs +++ b/openless-all/app/src-tauri/src/lib.rs @@ -83,12 +83,17 @@ pub fn run() { #[cfg(target_os = "windows")] { use window_vibrancy::apply_mica; - if let Err(e) = apply_mica(&main, None) { - log::warn!("[main] mica failed: {e}"); - } + // The window starts hidden so Windows native chrome can be disabled before + // the first show; doing this after the native frame is visible is unreliable. if let Err(e) = main.set_decorations(false) { log::warn!("[main] disable native decorations failed: {e}"); } + if let Err(e) = apply_mica(&main, None) { + log::warn!("[main] mica failed: {e}"); + } + } + if let Err(e) = main.show() { + log::warn!("[main] initial show failed: {e}"); } } diff --git a/openless-all/app/src-tauri/tauri.conf.json b/openless-all/app/src-tauri/tauri.conf.json index 2dc524fb..3746c61a 100644 --- a/openless-all/app/src-tauri/tauri.conf.json +++ b/openless-all/app/src-tauri/tauri.conf.json @@ -26,7 +26,7 @@ "shadow": true, "hiddenTitle": true, "titleBarStyle": "Overlay", - "visible": true, + "visible": false, "acceptFirstMouse": true }, { From 8f5b7682ce33aea11f36cf5ed5b0229582eb6266 Mon Sep 17 00:00:00 2001 From: Cooper-X-Oak Date: Fri, 1 May 2026 17:54:10 +0800 Subject: [PATCH 2/4] fix(windows): align custom shell rounded frame --- openless-all/app/src-tauri/Cargo.lock | 1 + openless-all/app/src-tauri/Cargo.toml | 3 + openless-all/app/src-tauri/src/lib.rs | 100 +++++++++++++++++- .../app/src/components/FloatingShell.tsx | 2 +- .../app/src/components/WindowChrome.tsx | 4 +- openless-all/app/src/styles/global.css | 4 +- 6 files changed, 110 insertions(+), 4 deletions(-) diff --git a/openless-all/app/src-tauri/Cargo.lock b/openless-all/app/src-tauri/Cargo.lock index e85dba0c..1e52ecb5 100644 --- a/openless-all/app/src-tauri/Cargo.lock +++ b/openless-all/app/src-tauri/Cargo.lock @@ -3270,6 +3270,7 @@ dependencies = [ "objc2-foundation 0.2.2", "once_cell", "parking_lot", + "raw-window-handle", "rdev", "reqwest 0.12.28", "serde", diff --git a/openless-all/app/src-tauri/Cargo.toml b/openless-all/app/src-tauri/Cargo.toml index 2d68c83c..23c01e63 100644 --- a/openless-all/app/src-tauri/Cargo.toml +++ b/openless-all/app/src-tauri/Cargo.toml @@ -52,8 +52,11 @@ objc2-foundation = "0.2" objc2-app-kit = "0.2" [target.'cfg(target_os = "windows")'.dependencies] +raw-window-handle = "0.6" windows = { version = "0.58", features = [ "Win32_Foundation", + "Win32_Graphics_Dwm", + "Win32_Graphics_Gdi", "Win32_UI_Shell", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_WindowsAndMessaging", diff --git a/openless-all/app/src-tauri/src/lib.rs b/openless-all/app/src-tauri/src/lib.rs index ca55937b..cbf4d293 100644 --- a/openless-all/app/src-tauri/src/lib.rs +++ b/openless-all/app/src-tauri/src/lib.rs @@ -91,6 +91,7 @@ pub fn run() { if let Err(e) = apply_mica(&main, None) { log::warn!("[main] mica failed: {e}"); } + apply_windows_rounded_frame(&main); } if let Err(e) = main.show() { log::warn!("[main] initial show failed: {e}"); @@ -189,10 +190,16 @@ pub fn run() { RunEvent::Reopen { .. } => show_main_window(app), RunEvent::WindowEvent { label, event, .. } => { if label == "main" { - if let tauri::WindowEvent::CloseRequested { api, .. } = event { + if let tauri::WindowEvent::CloseRequested { ref api, .. } = event { api.prevent_close(); hide_main_window(app); } + #[cfg(target_os = "windows")] + if matches!(event, tauri::WindowEvent::Resized(_) | tauri::WindowEvent::ScaleFactorChanged { .. }) { + if let Some(main) = app.get_webview_window("main") { + apply_windows_rounded_frame(&main); + } + } } } RunEvent::Exit => { @@ -203,6 +210,97 @@ pub fn run() { }); } +#[cfg(target_os = "windows")] +fn apply_windows_rounded_frame(window: &tauri::WebviewWindow) { + use raw_window_handle::{HasWindowHandle, RawWindowHandle}; + use windows::Win32::Foundation::{BOOL, HWND, RECT}; + use windows::Win32::Graphics::Dwm::{ + DwmSetWindowAttribute, DWMWA_BORDER_COLOR, DWMWA_WINDOW_CORNER_PREFERENCE, DWMWCP_ROUND, + }; + use windows::Win32::Graphics::Gdi::{CreateRoundRectRgn, SetWindowRgn, HRGN}; + use windows::Win32::UI::WindowsAndMessaging::{ + GetWindowLongW, GetWindowRect, SetWindowLongW, SetWindowPos, GWL_STYLE, SWP_FRAMECHANGED, + SWP_NOMOVE, SWP_NOSIZE, SWP_NOZORDER, WS_CAPTION, WS_THICKFRAME, + }; + + let handle = match window.window_handle().map(|h| h.as_raw()) { + Ok(RawWindowHandle::Win32(handle)) => handle, + Ok(other) => { + log::warn!("[main] unexpected raw window handle for DWM frame: {other:?}"); + return; + } + Err(e) => { + log::warn!("[main] read raw window handle failed: {e}"); + return; + } + }; + let hwnd = HWND(handle.hwnd.get() as *mut core::ffi::c_void); + + unsafe { + let style = GetWindowLongW(hwnd, GWL_STYLE); + let native_frame_bits = (WS_CAPTION.0 | WS_THICKFRAME.0) as i32; + if style & native_frame_bits != 0 { + SetWindowLongW(hwnd, GWL_STYLE, style & !native_frame_bits); + if let Err(e) = SetWindowPos( + hwnd, + HWND::default(), + 0, + 0, + 0, + 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED, + ) { + log::warn!("[main] refresh native frame after style update failed: {e}"); + } + } + + if window.is_maximized().unwrap_or(false) { + let _ = SetWindowRgn(hwnd, HRGN::default(), BOOL(1)); + return; + } + + let corner_preference = DWMWCP_ROUND; + if let Err(e) = DwmSetWindowAttribute( + hwnd, + DWMWA_WINDOW_CORNER_PREFERENCE, + &corner_preference as *const _ as *const core::ffi::c_void, + std::mem::size_of_val(&corner_preference) as u32, + ) { + log::warn!("[main] set DWM rounded corners failed: {e}"); + } + + // Remove DWM's fallback 1px light border; the React shell draws the visual stroke. + let border_color_none: u32 = 0xFFFFFFFE; + if let Err(e) = DwmSetWindowAttribute( + hwnd, + DWMWA_BORDER_COLOR, + &border_color_none as *const _ as *const core::ffi::c_void, + std::mem::size_of_val(&border_color_none) as u32, + ) { + log::warn!("[main] remove DWM border color failed: {e}"); + } + + let mut rect = RECT::default(); + if let Err(e) = GetWindowRect(hwnd, &mut rect) { + log::warn!("[main] read window rect for rounded region failed: {e}"); + return; + } + let width = rect.right - rect.left; + let height = rect.bottom - rect.top; + if width <= 0 || height <= 0 { + return; + } + let region = CreateRoundRectRgn(0, 0, width + 1, height + 1, 18, 18); + if region.is_invalid() { + log::warn!("[main] create rounded window region failed"); + return; + } + if SetWindowRgn(hwnd, region, BOOL(1)) == 0 { + log::warn!("[main] apply rounded window region failed"); + } + } +} + #[tauri::command] fn restart_app(app: AppHandle) { // macOS:自动更新会让新装的 .app 带 com.apple.quarantine(无论 Tauri updater diff --git a/openless-all/app/src/components/FloatingShell.tsx b/openless-all/app/src/components/FloatingShell.tsx index 8186fa6f..5abbc9a6 100644 --- a/openless-all/app/src/components/FloatingShell.tsx +++ b/openless-all/app/src/components/FloatingShell.tsx @@ -253,7 +253,7 @@ function FloatingShellBody({ os, initialTab, initialSettings }: { os: OS; initia flex: 1, minWidth: 0, overflow: 'hidden', background: 'var(--ol-surface)', - borderRadius: os === 'mac' ? 20 : 14, + borderRadius: os === 'mac' ? 20 : 10, border: '0.5px solid rgba(0,0,0,0.06)', boxShadow: '0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 24px -12px rgba(15,17,22,0.10), 0 2px 6px -2px rgba(15,17,22,0.06)', display: 'flex', diff --git a/openless-all/app/src/components/WindowChrome.tsx b/openless-all/app/src/components/WindowChrome.tsx index c4a1e84a..f78c344d 100644 --- a/openless-all/app/src/components/WindowChrome.tsx +++ b/openless-all/app/src/components/WindowChrome.tsx @@ -26,6 +26,8 @@ export function detectOS(): OS { const MAC_TITLEBAR_HEIGHT = 36; const MAC_SYSTEM_CONTROLS_RESERVED_WIDTH = 80; +const MAC_WINDOW_RADIUS = 20; +const WIN_WINDOW_RADIUS = 0; interface WindowChromeProps { os?: OS; @@ -41,7 +43,7 @@ export function WindowChrome({ os = 'mac', title = 'OpenLess', children, height width: '100%', height, position: 'relative', - borderRadius: os === 'mac' ? 20 : 14, + borderRadius: os === 'mac' ? MAC_WINDOW_RADIUS : WIN_WINDOW_RADIUS, boxShadow: 'var(--ol-shadow-xl)', overflow: 'hidden', display: 'flex', diff --git a/openless-all/app/src/styles/global.css b/openless-all/app/src/styles/global.css index 8ab6a8d5..cda62844 100644 --- a/openless-all/app/src/styles/global.css +++ b/openless-all/app/src/styles/global.css @@ -3,17 +3,19 @@ html, body, #root { width: 100%; margin: 0; padding: 0; + background: transparent; + overflow: hidden; } body { background: transparent; user-select: none; -webkit-user-select: none; - overflow: hidden; } #root { display: flex; + isolation: isolate; } button { From 0835409006c44de141698cb6d4ccadb3d119afc2 Mon Sep 17 00:00:00 2001 From: Cooper-X-Oak Date: Fri, 1 May 2026 18:17:57 +0800 Subject: [PATCH 3/4] fix(windows): restore custom chrome interactions --- openless-all/app/src-tauri/src/lib.rs | 6 +- .../app/src/components/WindowChrome.tsx | 120 +++++++++++++++--- 2 files changed, 108 insertions(+), 18 deletions(-) diff --git a/openless-all/app/src-tauri/src/lib.rs b/openless-all/app/src-tauri/src/lib.rs index cbf4d293..b483fa61 100644 --- a/openless-all/app/src-tauri/src/lib.rs +++ b/openless-all/app/src-tauri/src/lib.rs @@ -238,9 +238,9 @@ fn apply_windows_rounded_frame(window: &tauri::WebviewWindow) { unsafe { let style = GetWindowLongW(hwnd, GWL_STYLE); - let native_frame_bits = (WS_CAPTION.0 | WS_THICKFRAME.0) as i32; - if style & native_frame_bits != 0 { - SetWindowLongW(hwnd, GWL_STYLE, style & !native_frame_bits); + let desired_style = (style | WS_THICKFRAME.0 as i32) & !(WS_CAPTION.0 as i32); + if style != desired_style { + SetWindowLongW(hwnd, GWL_STYLE, desired_style); if let Err(e) = SetWindowPos( hwnd, HWND::default(), diff --git a/openless-all/app/src/components/WindowChrome.tsx b/openless-all/app/src/components/WindowChrome.tsx index f78c344d..48f60305 100644 --- a/openless-all/app/src/components/WindowChrome.tsx +++ b/openless-all/app/src/components/WindowChrome.tsx @@ -11,8 +11,9 @@ // │ [icon footer] │ // └───────────────────────────────────────────────┘ -import { type CSSProperties, type ReactNode } from 'react'; +import { useState, type CSSProperties, type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; +import { getCurrentWindow } from '@tauri-apps/api/window'; export type OS = 'mac' | 'win'; @@ -28,6 +29,18 @@ const MAC_TITLEBAR_HEIGHT = 36; const MAC_SYSTEM_CONTROLS_RESERVED_WIDTH = 80; const MAC_WINDOW_RADIUS = 20; const WIN_WINDOW_RADIUS = 0; +const WIN_RESIZE_EDGE = 6; +const WIN_RESIZE_CORNER = 14; + +type ResizeDirection = + | 'East' + | 'North' + | 'NorthEast' + | 'NorthWest' + | 'South' + | 'SouthEast' + | 'SouthWest' + | 'West'; interface WindowChromeProps { os?: OS; @@ -59,6 +72,7 @@ export function WindowChrome({ os = 'mac', title = 'OpenLess', children, height }} > {os === 'win' && } + {os === 'win' && } {/* macOS:三色窗口按钮交给系统绘制和定位。这里只保留顶部拖动区, 并避开系统按钮热区,防止拖动层吞掉 close/minimize/zoom 点击。 */} {os === 'mac' && ( @@ -95,7 +109,7 @@ function WinTitleBar({ title }: WinTitleBarProps) { display: 'flex', alignItems: 'stretch', position: 'relative', - zIndex: 5, + zIndex: 70, }} >
{title}
-
- - - +
); } +function WindowsResizeHandles() { + const handles: Array<{ + direction: ResizeDirection; + cursor: CSSProperties['cursor']; + style: CSSProperties; + }> = [ + { direction: 'North', cursor: 'ns-resize', style: { top: 0, left: WIN_RESIZE_CORNER, right: WIN_RESIZE_CORNER, height: WIN_RESIZE_EDGE } }, + { direction: 'South', cursor: 'ns-resize', style: { bottom: 0, left: WIN_RESIZE_CORNER, right: WIN_RESIZE_CORNER, height: WIN_RESIZE_EDGE } }, + { direction: 'West', cursor: 'ew-resize', style: { top: WIN_RESIZE_CORNER, bottom: WIN_RESIZE_CORNER, left: 0, width: WIN_RESIZE_EDGE } }, + { direction: 'East', cursor: 'ew-resize', style: { top: WIN_RESIZE_CORNER, bottom: WIN_RESIZE_CORNER, right: 0, width: WIN_RESIZE_EDGE } }, + { direction: 'NorthWest', cursor: 'nwse-resize', style: { top: 0, left: 0, width: WIN_RESIZE_CORNER, height: WIN_RESIZE_CORNER } }, + { direction: 'NorthEast', cursor: 'nesw-resize', style: { top: 0, right: 0, width: WIN_RESIZE_CORNER, height: WIN_RESIZE_CORNER } }, + { direction: 'SouthWest', cursor: 'nesw-resize', style: { bottom: 0, left: 0, width: WIN_RESIZE_CORNER, height: WIN_RESIZE_CORNER } }, + { direction: 'SouthEast', cursor: 'nwse-resize', style: { bottom: 0, right: 0, width: WIN_RESIZE_CORNER, height: WIN_RESIZE_CORNER } }, + ]; + + return ( +
+ {handles.map(handle => ( +
{ + if (event.button !== 0) return; + event.preventDefault(); + event.stopPropagation(); + void startWindowsResize(handle.direction); + }} + style={{ + position: 'absolute', + pointerEvents: 'auto', + cursor: handle.cursor, + ...handle.style, + }} + /> + ))} +
+ ); +} + +interface WinTitleButtonProps { + title: string; + action: 'minimize' | 'toggleMaximize' | 'close'; + children: ReactNode; + tone?: 'default' | 'danger'; +} + +function WinTitleButton({ title, action, children, tone = 'default' }: WinTitleButtonProps) { + const [hovered, setHovered] = useState(false); + const [pressed, setPressed] = useState(false); + const danger = tone === 'danger'; + const background = pressed + ? danger ? '#c42b1c' : 'rgba(0,0,0,0.12)' + : hovered ? danger ? '#e81123' : 'rgba(0,0,0,0.08)' + : 'transparent'; + const color = danger && (hovered || pressed) ? '#fff' : 'var(--ol-ink-3)'; + + return ( + + ); +} + +async function startWindowsResize(direction: ResizeDirection) { + try { + await getCurrentWindow().startResizeDragging(direction); + } catch (error) { + console.warn(`[window] Windows resize ${direction} failed`, error); + } +} + async function runWindowsWindowAction(action: 'minimize' | 'toggleMaximize' | 'close') { try { - const { getCurrentWindow } = await import('@tauri-apps/api/window'); const currentWindow = getCurrentWindow(); if (action === 'minimize') { await currentWindow.minimize(); @@ -148,8 +243,3 @@ const winBtnStyle: CSSProperties = { cursor: 'default', transition: 'background 0.12s ease-out, color 0.12s ease-out', }; - -const winCloseBtnStyle: CSSProperties = { - ...winBtnStyle, - color: 'var(--ol-ink-3)', -}; From fd5466c3c9fd0c6a2edbd295d4b5c23831405319 Mon Sep 17 00:00:00 2001 From: Cooper-X-Oak Date: Sat, 2 May 2026 06:35:03 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix(windows):=20=E6=94=B6=E7=B4=A7=E4=B8=BB?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=20shell=20=E5=A4=96=E8=A7=82=E5=A5=91?= =?UTF-8?q?=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/scripts/windows-ui-config.test.mjs | 15 +++++ openless-all/app/src-tauri/tauri.conf.json | 2 +- .../app/src/components/FloatingShell.tsx | 2 +- .../app/src/components/WindowChrome.tsx | 61 ++++++++++--------- 4 files changed, 48 insertions(+), 32 deletions(-) diff --git a/openless-all/app/scripts/windows-ui-config.test.mjs b/openless-all/app/scripts/windows-ui-config.test.mjs index ad98ca64..70fc7c15 100644 --- a/openless-all/app/scripts/windows-ui-config.test.mjs +++ b/openless-all/app/scripts/windows-ui-config.test.mjs @@ -9,9 +9,24 @@ function assertEqual(actual, expected, name) { const raw = await readFile(new URL('../src-tauri/tauri.conf.json', import.meta.url), 'utf-8'); const config = JSON.parse(raw); const mainWindow = config.app.windows.find((window) => window.label === 'main'); +const windowChromeTsx = await readFile(new URL('../src/components/WindowChrome.tsx', import.meta.url), 'utf-8'); +const floatingShellTsx = await readFile(new URL('../src/components/FloatingShell.tsx', import.meta.url), 'utf-8'); if (!mainWindow) { throw new Error('main window config missing'); } assertEqual(mainWindow.decorations, false, 'windows main window should use only custom titlebar'); +assertEqual(mainWindow.visible, false, 'windows main window should stay hidden until the intended first show point'); + +if (!/function WindowsResizeHandles\(\)/.test(windowChromeTsx)) { + throw new Error('windows frameless shell should expose explicit resize handles'); +} + +if (!/startResizeDragging\(direction\)/.test(windowChromeTsx)) { + throw new Error('windows resize handles should delegate edge dragging to Tauri'); +} + +if (!/borderRadius:\s*'var\(--ol-window-console-radius\)'/.test(floatingShellTsx)) { + throw new Error('floating shell should consume the shared window-console radius'); +} diff --git a/openless-all/app/src-tauri/tauri.conf.json b/openless-all/app/src-tauri/tauri.conf.json index 3746c61a..95469c50 100644 --- a/openless-all/app/src-tauri/tauri.conf.json +++ b/openless-all/app/src-tauri/tauri.conf.json @@ -21,7 +21,7 @@ "minWidth": 980, "minHeight": 640, "resizable": true, - "decorations": true, + "decorations": false, "transparent": true, "shadow": true, "hiddenTitle": true, diff --git a/openless-all/app/src/components/FloatingShell.tsx b/openless-all/app/src/components/FloatingShell.tsx index 5abbc9a6..92a64cb0 100644 --- a/openless-all/app/src/components/FloatingShell.tsx +++ b/openless-all/app/src/components/FloatingShell.tsx @@ -253,7 +253,7 @@ function FloatingShellBody({ os, initialTab, initialSettings }: { os: OS; initia flex: 1, minWidth: 0, overflow: 'hidden', background: 'var(--ol-surface)', - borderRadius: os === 'mac' ? 20 : 10, + borderRadius: 'var(--ol-window-console-radius)', border: '0.5px solid rgba(0,0,0,0.06)', boxShadow: '0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 24px -12px rgba(15,17,22,0.10), 0 2px 6px -2px rgba(15,17,22,0.06)', display: 'flex', diff --git a/openless-all/app/src/components/WindowChrome.tsx b/openless-all/app/src/components/WindowChrome.tsx index 48f60305..ae42183a 100644 --- a/openless-all/app/src/components/WindowChrome.tsx +++ b/openless-all/app/src/components/WindowChrome.tsx @@ -1,16 +1,3 @@ -// WindowChrome.tsx — frosted outer frame + raised inner console pattern. -// The OUTER frame is a translucent shell with a tinted backdrop showing through. -// The INNER content lives in a single raised card that floats above it. -// -// Layout per window: -// ┌─ frosted outer ───────────────────────────────┐ -// │ [titlebar] │ -// │ ┌─ raised console (white, shadow) ─┐ │ -// │ │ sidebar │ main │ │ -// │ └──────────────────────────────────┘ │ -// │ [icon footer] │ -// └───────────────────────────────────────────────┘ - import { useState, type CSSProperties, type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { getCurrentWindow } from '@tauri-apps/api/window'; @@ -27,8 +14,9 @@ export function detectOS(): OS { const MAC_TITLEBAR_HEIGHT = 36; const MAC_SYSTEM_CONTROLS_RESERVED_WIDTH = 80; -const MAC_WINDOW_RADIUS = 20; -const WIN_WINDOW_RADIUS = 0; +export const WIN_TITLEBAR_HEIGHT = 36; +export const WIN_WINDOW_RADIUS = 10; +export const WIN_CONSOLE_RADIUS = 10; const WIN_RESIZE_EDGE = 6; const WIN_RESIZE_CORNER = 14; @@ -49,19 +37,32 @@ interface WindowChromeProps { height?: number | string; } -export function WindowChrome({ os = 'mac', title = 'OpenLess', children, height = 800 }: WindowChromeProps) { +export function WindowChrome({ + os = 'mac', + title = 'OpenLess', + children, + height = 800, +}: WindowChromeProps) { + const shellRadius = os === 'mac' ? 20 : WIN_WINDOW_RADIUS; + const consoleRadius = os === 'mac' ? 20 : WIN_CONSOLE_RADIUS; + return (
{os === 'win' && } {os === 'win' && } - {/* macOS:三色窗口按钮交给系统绘制和定位。这里只保留顶部拖动区, - 并避开系统按钮热区,防止拖动层吞掉 close/minimize/zoom 点击。 */} {os === 'mac' && (
runWindowsWindowAction(action)} onMouseEnter={() => setHovered(true)} onMouseLeave={() => { setHovered(false); @@ -201,14 +203,13 @@ function WinTitleButton({ title, action, children, tone = 'default' }: WinTitleB }} onMouseDown={() => setPressed(true)} onMouseUp={() => setPressed(false)} - onClick={() => runWindowsWindowAction(action)} > {children} ); } -async function startWindowsResize(direction: ResizeDirection) { +async function startResizeDragging(direction: ResizeDirection) { try { await getCurrentWindow().startResizeDragging(direction); } catch (error) {