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) } } }