From 066d634d24ff3be96ffb5b7113a33cbb0d526490 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Wed, 18 Jan 2017 20:13:25 -0500 Subject: [PATCH] Don't save maximized window state/position on OSX --- src/AppFrame.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 4c47dce..05b9f4d 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1321,8 +1321,15 @@ void AppFrame::OnClose(wxCloseEvent& event) { return; } +#ifdef __APPLE__ + if (!this->IsMaximized()) { + wxGetApp().getConfig()->setWindow(this->GetPosition(), this->GetClientSize()); + wxGetApp().getConfig()->setWindowMaximized(this->IsMaximized()); + } +#else wxGetApp().getConfig()->setWindow(this->GetPosition(), this->GetClientSize()); wxGetApp().getConfig()->setWindowMaximized(this->IsMaximized()); +#endif wxGetApp().getConfig()->setTheme(ThemeMgr::mgr.getTheme()); wxGetApp().getConfig()->setFontScale(GLFont::getScale()); wxGetApp().getConfig()->setSnap(wxGetApp().getFrequencySnap());