1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-13 02:08: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,6 +19,7 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
observeIputSourceChangedNotification();
textInputSourceDidChange()
self.button.cell?.action = #selector(switchInputSource)
self.button.action = #selector(switchInputSource)
}
@ -26,6 +27,11 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
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()