From f92f7ca803a2b436e5f4cb18f1399ca911bd85c2 Mon Sep 17 00:00:00 2001 From: lwouis Date: Fri, 27 Dec 2024 15:48:52 +0100 Subject: [PATCH] chore: fix new compilation errors from xcode 16.2 --- src/api-wrappers/AXUIElement.swift | 4 +++- src/ui/main-window/PreviewPanel.swift | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api-wrappers/AXUIElement.swift b/src/api-wrappers/AXUIElement.swift index 54405f3b..fedf6092 100644 --- a/src/api-wrappers/AXUIElement.swift +++ b/src/api-wrappers/AXUIElement.swift @@ -68,7 +68,9 @@ extension AXUIElement { private func value(_ key: String, _ target: T, _ type: AXValueType) throws -> T? { if let a = try attribute(key, AXValue.self) { var value = target - AXValueGetValue(a, type, &value) + _ = withUnsafePointer(to: &value) { + AXValueGetValue(a, type, UnsafeMutableRawPointer(mutating: $0)) + } return value } return nil diff --git a/src/ui/main-window/PreviewPanel.swift b/src/ui/main-window/PreviewPanel.swift index 91849dcb..4d7b1397 100644 --- a/src/ui/main-window/PreviewPanel.swift +++ b/src/ui/main-window/PreviewPanel.swift @@ -47,7 +47,7 @@ class PreviewPanel: NSPanel { // 2. Select a window in the switcher that is on the same monitor as the thumbnails panel, and whose position overlaps with the thumbnails panel // 3. For a single frame, the preview of the newly selected window can appear above the thumbnails panel before going back underneath it // Simply using order(.below) is not sufficient to prevent this brief flicker. We explicitly set the preview panel's window level to be one below the thumbnails panel - App.app.previewPanel.level = App.app.thumbnailsPanel.level - 1 + App.app.previewPanel.level = NSWindow.Level(rawValue: App.app.previewPanel.level.rawValue - 1) } } }