From 0b04eed82ba0289979d17ea7fb223506f875fd45 Mon Sep 17 00:00:00 2001 From: nomi-nonsz Date: Wed, 3 Sep 2025 12:45:09 +0700 Subject: [PATCH] change restore window --- src/components/client-windows.tsx | 10 +++++++--- src/hooks/window-manager.tsx | 13 +++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/components/client-windows.tsx b/src/components/client-windows.tsx index b51c226..a2d8ad5 100644 --- a/src/components/client-windows.tsx +++ b/src/components/client-windows.tsx @@ -8,12 +8,16 @@ import React, { useState, useRef, useEffect, useReducer } from "react"; export const RestoreWindowsButton = ({ onClick, className, ...props}: React.ComponentProps<"button">) => { const windowManager = useWindowManager(); - const isAnyWindowsClosed = !windowManager.windows.find(w => w.closed == true); + const isWindowsDataDirty = !windowManager.windows.find(w => + w.closed == true + || w.minimized == true + || (w.offset.x != 0 && w.offset.y != 0) + ) return (