Another issue with Aero Snap fixed
This commit is contained in:
parent
c375afe411
commit
f8e81f8a70
@ -501,6 +501,24 @@ WXLRESULT wxAppBar::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar
|
|||||||
return lResult;
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case WM_WINDOWPOSCHANGING: {
|
||||||
|
if (m_state != m_stateDesired && IsDocked(m_stateDesired)) {
|
||||||
|
wxASSERT(lParam);
|
||||||
|
LPWINDOWPOS lpwndpos = (LPWINDOWPOS)lParam;
|
||||||
|
|
||||||
|
// When about to get docked, fix position and size to avoid Aero Snap interfering with window size.
|
||||||
|
RECT rect;
|
||||||
|
GetDockedRect(m_stateDesired, &rect);
|
||||||
|
lpwndpos->x = rect.left;
|
||||||
|
lpwndpos->y = rect.top;
|
||||||
|
lpwndpos->cx = rect.right - rect.left;
|
||||||
|
lpwndpos->cy = rect.bottom - rect.top;
|
||||||
|
lpwndpos->flags &= ~(SWP_NOMOVE | SWP_NOSIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
case WM_WINDOWPOSCHANGED: {
|
case WM_WINDOWPOSCHANGED: {
|
||||||
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user