diff --git a/src/components/WindowManager.jsx b/src/components/WindowManager.jsx index 3ea0495..5eab13a 100644 --- a/src/components/WindowManager.jsx +++ b/src/components/WindowManager.jsx @@ -14,11 +14,21 @@ import { // eslint-disable-next-line max-len const selectWindowIds = (state) => state.windows.windows.map((win) => win.windowId); // eslint-disable-next-line max-len -const selectMeta = (state) => [state.windows.showWindows, state.windows.someFullscreen]; +const selectMeta = (state) => { + console.log('check'); + return [ + state.windows.showWindows, + state.windows.someFullscreen, + state.windows.windows.some((win) => win.fullscreen && win.open && !win.hidden), +]}; const WindowManager = () => { const windowIds = useSelector(selectWindowIds, shallowEqual); - const [showWindows, someFullscreen] = useSelector(selectMeta, shallowEqual); + const [ + showWindows, + someFullscreen, + someOpenFullscreen, + ] = useSelector(selectMeta, shallowEqual); const dispatch = useDispatch(); if ((!showWindows && !someFullscreen) || !windowIds.length) { @@ -28,7 +38,7 @@ const WindowManager = () => { return (
dispatch(closeFullscreenWindows())} /> {windowIds.map((id) => )}