Skip to content

Commit

Permalink
Fix an issue where an unnatural drawing shift occurs momentarily when…
Browse files Browse the repository at this point in the history
… launching WinMerge if Windows animation effects are enabled and the WinMerge window is maximized.
  • Loading branch information
sdottaka committed Jan 23, 2025
1 parent 44d7978 commit afa114c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Src/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ void CMainFrame::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncs
{
if (IsZoomed())
{
lpncsp->rgrc[0].top = rcWindow.top + GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER);
lpncsp->rgrc[0].top = rcWindow.top + 0;
//lpncsp->rgrc[0].left += 1;
//lpncsp->rgrc[0].right -= 1;
lpncsp->rgrc[0].bottom -= 1;
Expand Down
3 changes: 2 additions & 1 deletion Src/TitleBarHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ void CTitleBarHelper::Init(CWnd *pWnd)

int CTitleBarHelper::GetTopMargin() const
{
return 0;
return m_maximized ?
(GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)) : 0;
}

void CTitleBarHelper::DrawIcon(CWnd* pWnd, CDC& dc, bool active)
Expand Down

0 comments on commit afa114c

Please sign in to comment.