Wx files working

This commit is contained in:
Joey Yakimowich-Payne 2023-02-11 16:21:02 -07:00
commit 30cb0f8f63
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
54 changed files with 3157 additions and 5197 deletions

View file

@ -113,6 +113,38 @@ public:
return false;
}
if (m_placement.showCmd != SW_SHOWMAXIMIZED && m_placement.showCmd != SW_SHOWMINIMIZED)
{
RECT rcWindow;
::GetWindowRect(tlw->GetHWND(), &rcWindow);
// Height and width should be the same unless the user performed
// an Aero Snap operation.
const RECT rcNormal = m_placement.rcNormalPosition;
if ((rcWindow.bottom - rcWindow.top) != (rcNormal.bottom - rcNormal.top) ||
(rcWindow.right - rcWindow.left) != (rcNormal.right - rcNormal.left))
{
WinStruct<MONITORINFO> mi;
if (!::GetMonitorInfo(::MonitorFromWindow(tlw->GetHWND(),
MONITOR_DEFAULTTONEAREST), &mi))
{
wxLogLastError("GetMonitorInfo");
return false;
}
// If the tray is on the top or the left, then the rectangle needs to
// be adjusted to match what ::SetWindowPlacement expects.
if (mi.rcMonitor.top < mi.rcWork.top ||
mi.rcMonitor.left < mi.rcWork.left)
{
// Negative offset to eliminate the tray width/height.
OffsetRect(&rcWindow, (mi.rcMonitor.left - mi.rcWork.left),
(mi.rcMonitor.top - mi.rcWork.top));
}
::CopyRect(&m_placement.rcNormalPosition, &rcWindow);
}
}
return true;
}

View file

@ -56,6 +56,7 @@ public:
bool m_initialized;
bool m_isBusy;
bool m_inEventCallback;
wxString m_pendingURL;
wxString m_pendingPage;
int m_pendingContextMenuEnabled;