1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-11 09:28:38 +00:00

* fixed switching input source

This commit is contained in:
ad 2018-04-26 22:50:38 +03:00
parent e1268d0d65
commit 76bdf12745

View File

@ -19,12 +19,18 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
observeIputSourceChangedNotification();
textInputSourceDidChange()
self.button.cell?.action = #selector(switchInputSource)
self.button.action = #selector(switchInputSource)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc override func handleGestureSingle(gr: NSClickGestureRecognizer) {
super.handleGestureSingle(gr: gr)
switchInputSource()
}
@objc public func textInputSourceDidChange() {
let currentSource = TISCopyCurrentKeyboardInputSource().takeUnretainedValue()