7eb95255c regressed disabling the minimize button on owned windows. Split what was previously `IsDialog` into two flags: `IsModal` and `IsOwned` and use `IsOwned` to control the disabled state of the minimize button.
This was preventing owner windows of non-modal dialogs from receiving key window status, meaning that input was broken in combination with embedding (Avalonia controls did work however because the routing was carried out internal to Avalonia).
When a window is closed, its parent window is set to null, which caused this code to run. This line caused the parent window to be brought to front, and should have also caused any other child windows to be brought to front, but it seems OSX ignored those requests, causing #8878.
Simply don't bring the parent window to the front when a child window is closed. I couldn't work out why this code was necessary anyway, and all integration tests still pass.
Fixes#8878.
The previous solution didn't work for owned windows. Hopefully this fixes the problem at its root: that `BringToFront` activates a window even if it's miniaturized.
Previously, `_actualWindowState` was being set after the window state had finished changing, but `ExitFullScreenMode` calls `UpdateStyle` which expects `_actualWindowState` to be up-to-date, meaning that previously we ended up with an invalid size when exiting full screen mode programatically.
A non-client click was being received after the click to minimize the window, which caused a call to `_parent->BringToFront();`, meaning the window got immediately restored. Ignore clicks when the window is minimized.
Fixes#8335