From 1dccd398183bea8de0f3a43e054cd89b56754e7a Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Tue, 4 Jun 2019 15:56:22 +0530 Subject: [PATCH] macOS: Save/restore the log window's size Signed-off-by: Roopesh Chander --- .../WireGuard/UI/macOS/ViewController/LogViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift index 6666c22..39ce663 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift @@ -193,6 +193,10 @@ class LogViewController: NSViewController { updateLogEntriesTimer = nil } + override func viewWillAppear() { + view.window?.setFrameAutosaveName(NSWindow.FrameAutosaveName("LogWindow")) + } + override func viewWillDisappear() { super.viewWillDisappear() stopUpdatingLogEntries()