1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-28 08:13:17 +03:00

GH-545 Restore the first responder when entering/exiting fullscreen.

This commit is contained in:
Tae Won Ha 2018-01-14 13:38:34 +01:00
parent c32fcab3f6
commit 4dd33b97e6
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -34,6 +34,9 @@ extension MainWindow {
}
func unthemeTitlebar(dueFullScreen: Bool) {
// NSWindow becomes the first responder at the end of this method.
let firstResponder = self.window.firstResponder
self.clearCustomTitle()
guard let contentView = self.window.contentView else {
@ -42,7 +45,7 @@ extension MainWindow {
let prevFrame = window.frame
window.titlebarAppearsTransparent = false
self.window.titlebarAppearsTransparent = false
self.workspace.removeFromSuperview()
@ -58,6 +61,8 @@ extension MainWindow {
self.window.setFrame(prevFrame, display: true, animate: false)
self.titlebarThemed = false
}
self.window.makeFirstResponder(firstResponder)
}
func set(repUrl url: URL?, themed: Bool) {