From 6aa4aec00e861af027270e65eaf3c470f6788984 Mon Sep 17 00:00:00 2001 From: Sandy Armstrong Date: Thu, 12 May 2022 12:38:51 -0700 Subject: Handle macos workload RC3 API updates --- Xwt.XamMac/Xwt.Mac/AccerssibilityHelper.cs | 2 +- Xwt.XamMac/Xwt.Mac/MacEngine.cs | 4 ++-- Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs | 2 -- Xwt.XamMac/Xwt.Mac/PopupWindowBackend.cs | 2 +- Xwt.XamMac/Xwt.Mac/Util.cs | 2 +- Xwt.XamMac/Xwt.Mac/WindowBackend.cs | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Xwt.XamMac/Xwt.Mac/AccerssibilityHelper.cs b/Xwt.XamMac/Xwt.Mac/AccerssibilityHelper.cs index 7fbbb6d0..ee448efe 100644 --- a/Xwt.XamMac/Xwt.Mac/AccerssibilityHelper.cs +++ b/Xwt.XamMac/Xwt.Mac/AccerssibilityHelper.cs @@ -109,7 +109,7 @@ namespace Xwt.Mac using (var dictionary = new NSDictionary(NSAccessibilityNotificationUserInfoKeys.AnnouncementKey, msg, NSAccessibilityNotificationUserInfoKeys.PriorityKey, polite ? NSAccessibilityPriorityLevel.Medium : NSAccessibilityPriorityLevel.High)) { - NSAccessibility.PostNotification(nsObject, NSAccessibilityNotifications.AnnouncementRequestedNotification, dictionary); + NSAccessibility.PostNotification(nsObject, NSView.AnnouncementRequestedNotification, dictionary); } } } diff --git a/Xwt.XamMac/Xwt.Mac/MacEngine.cs b/Xwt.XamMac/Xwt.Mac/MacEngine.cs index 3195ed7d..57e69113 100644 --- a/Xwt.XamMac/Xwt.Mac/MacEngine.cs +++ b/Xwt.XamMac/Xwt.Mac/MacEngine.cs @@ -190,8 +190,8 @@ namespace Xwt.Mac if (!action ()) timer.Invalidate (); }); - runLoop.AddTimer (timer, NSRunLoop.NSDefaultRunLoopMode); - runLoop.AddTimer (timer, NSRunLoop.NSRunLoopModalPanelMode); + runLoop.AddTimer (timer, NSRunLoopMode.Default); + runLoop.AddTimer (timer, NSRunLoopMode.ModalPanel); return timer; } diff --git a/Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs b/Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs index 915d2a07..a9754d28 100644 --- a/Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs +++ b/Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs @@ -41,8 +41,6 @@ namespace Xwt.Mac if (System.Threading.Thread.GetData (ds) == null) { System.Threading.Thread.SetData (ds, true); - NSApplication.IgnoreMissingAssembliesDuringRegistration = true; - // Setup a registration handler that does not let Xamarin.Mac register assemblies by default. Runtime.AssemblyRegistration += Runtime_AssemblyRegistration; diff --git a/Xwt.XamMac/Xwt.Mac/PopupWindowBackend.cs b/Xwt.XamMac/Xwt.Mac/PopupWindowBackend.cs index d3bac419..ac60a298 100644 --- a/Xwt.XamMac/Xwt.Mac/PopupWindowBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/PopupWindowBackend.cs @@ -550,7 +550,7 @@ namespace Xwt.Mac ContentView.RemoveObserver(this, HiddenProperty); // HACK: Xamarin.Mac/MonoMac limitation: no direct way to release a window manually - // A NSWindow instance will be removed from NSApplication.SharedApplication.Windows + // A NSWindow instance will be removed from NSApplication.SharedApplication.DangerousWindows // only if it is being closed with ReleasedWhenClosed set to true but not on Dispose // and there is no managed way to tell Cocoa to release the window manually (and to // remove it from the active window list). diff --git a/Xwt.XamMac/Xwt.Mac/Util.cs b/Xwt.XamMac/Xwt.Mac/Util.cs index 6093bcda..7faa2431 100644 --- a/Xwt.XamMac/Xwt.Mac/Util.cs +++ b/Xwt.XamMac/Xwt.Mac/Util.cs @@ -612,7 +612,7 @@ namespace Xwt.Mac // apply color matrix var transformColor = new CIColorMatrix(); transformColor.SetDefaults(); - transformColor.Image = ciImage; + transformColor.InputImage = ciImage; transformColor.RVector = new CIVector(0, (float)color.Value.Red, 0); transformColor.GVector = new CIVector((float)color.Value.Green, 0, 0); transformColor.BVector = new CIVector(0, 0, (float)color.Value.Blue); diff --git a/Xwt.XamMac/Xwt.Mac/WindowBackend.cs b/Xwt.XamMac/Xwt.Mac/WindowBackend.cs index dcf904ea..e5eccac8 100644 --- a/Xwt.XamMac/Xwt.Mac/WindowBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/WindowBackend.cs @@ -488,7 +488,7 @@ namespace Xwt.Mac if (XamMacDangerousDispose) { // HACK: Xamarin.Mac/MonoMac limitation: no direct way to release a window manually - // A NSWindow instance will be removed from NSApplication.SharedApplication.Windows + // A NSWindow instance will be removed from NSApplication.SharedApplication.DangerousWindows // only if it is being closed with ReleasedWhenClosed set to true but not on Dispose // and there is no managed way to tell Cocoa to release the window manually (and to // remove it from the active window list). -- cgit v1.2.3