diff options
Diffstat (limited to 'xM')
-rw-r--r-- | xM/gen-icon.swift | 3 | ||||
-rw-r--r-- | xM/main.swift | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/xM/gen-icon.swift b/xM/gen-icon.swift index 712e9e6..0f7477c 100644 --- a/xM/gen-icon.swift +++ b/xM/gen-icon.swift @@ -3,6 +3,9 @@ // Copyright (c) 2023, Přemysl Eric Janouch <p@janouch.name> // SPDX-License-Identifier: 0BSD // +// As an odd regression, AppKit may be necessary for JIT linking. +import AppKit + // NSGraphicsContext mostly just weirdly wraps over Quartz, // so we do it all in Quartz directly. import CoreGraphics diff --git a/xM/main.swift b/xM/main.swift index 48f26c4..39b66c5 100644 --- a/xM/main.swift +++ b/xM/main.swift @@ -173,8 +173,11 @@ class RelayRPC { func send(data: RelayCommandData, callback: Callback? = nil) { self.commandSeq += 1 let m = RelayCommandMessage(commandSeq: self.commandSeq, data: data) - if let callback = callback { - self.commandCallbacks[m.commandSeq] = callback + self.commandCallbacks[m.commandSeq] = callback ?? { error, data in + if data == nil { + NSSound.beep() + Logger().warning("\(error)") + } } var w = RelayWriter() |