Possible to disable entire initial app window while a second window is open?

I am building a desktop app with Flutter for Windows and MacOS. When the user clicks a button on the initial app window then a second form window opens. I am using the desktop_multi_window package to open the second window.

While the second form window is open I would like user interaction with the initial app window to be completely disabled. When the second form window closes then the initial app window should be renabled. I believe this is a common desktop app pattern.

Check if the app is focused https://stackoverflow.com/a/79644232/9682338

If the window is inactive use AbsorbPointer https://stackoverflow.com/a/54220863/9682338

I don’t know how AppLifecycleState works in a multi window situation.