diff --git a/Photino.NET/PhotinoWindow.NET.cs b/Photino.NET/PhotinoWindow.NET.cs index 870375a..9be1a58 100644 --- a/Photino.NET/PhotinoWindow.NET.cs +++ b/Photino.NET/PhotinoWindow.NET.cs @@ -79,6 +79,11 @@ public partial class PhotinoWindow /// public static bool IsMacOsPlatform => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + /// + /// Indicates the version of MacOS + /// + public static Version MacOsVersion => IsMacOsPlatform ? Version.Parse(RuntimeInformation.OSDescription.Split(' ')[1]) : null; + /// /// Indicates whether the current platform is Linux. /// @@ -1597,7 +1602,11 @@ public PhotinoWindow MoveTo(Point location, bool allowOutsideWorkArea = false) // project files it is commented to be expected behavior for macOS. // There is some code trying to mitigate this problem but it might // not work as expected. Further investigation is necessary. - if (IsMacOsPlatform) + // Update: + // This behavior seems to have changed with macOS Sonoma. + // Therefore we determine the version of macOS and only apply the + // workaround for older versions. + if (IsMacOsPlatform && MacOsVersion.Major < 23) { var workArea = MainMonitor.WorkArea.Size; location.Y = location.Y >= 0