Skip to content

Commit

Permalink
retain titled & fullSizeContentView masks not to change the window po…
Browse files Browse the repository at this point in the history
…sition by title bar height
  • Loading branch information
banjun committed Dec 20, 2017
1 parent dde0764 commit 436ea7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PhotoStudioPlayer/BorderlessWindowDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ class BorderlessWindowDelegate: NSObject, NSWindowDelegate {
guard let window = notification.object as? NSWindow else {
return
}
window.styleMask = [.titled, .closable, .miniaturizable, .resizable]
window.styleMask = [.titled, .fullSizeContentView, .closable, .miniaturizable, .resizable]

}
func windowDidResignKey(_ notification: Notification) {
guard let window = notification.object as? NSWindow else {
return
}
window.styleMask = .borderless
window.styleMask = [.titled, .fullSizeContentView, .borderless]
}
}

0 comments on commit 436ea7c

Please sign in to comment.