diff --git a/src/Project.cpp b/src/Project.cpp index 486de30d1..42c3c576b 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -618,7 +618,8 @@ void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized) gPrefs->Read(wxT("/Window/Normal_Width"), &normalRect.width, defaultRect.width); gPrefs->Read(wxT("/Window/Normal_Height"), &normalRect.height, defaultRect.height); - // Workaround 2.1.1 and earlier bug on OSX...affects only normalRect, but be safe + // Workaround 2.1.1 and earlier bug on OSX...affects only normalRect, but let's just + // validate for all rects and plats if (normalRect.width == 0 || normalRect.height == 0) { normalRect = defaultRect; } @@ -626,6 +627,17 @@ void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized) windowRect = defaultRect; } +#if defined(__WXMAC__) + // On OSX, the top of the window should never be less than the menu height, + // so something is amiss if it is + if (normalRect.y < defaultRect.y) { + normalRect = defaultRect; + } + if (windowRect.y < defaultRect.y) { + windowRect = defaultRect; + } +#endif + if (gAudacityProjects.IsEmpty()) { if (*pMaximized || *pIconized) { *nextRect = normalRect;