Skip to content

Commit

Permalink
Fix the issue where the close button is not clickable when the mouse …
Browse files Browse the repository at this point in the history
…cursor is on the right corner of the close button when the window is maximized.
  • Loading branch information
sdottaka committed Oct 27, 2024
1 parent 0e4f87f commit 642f81f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Src/TitleBarHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ LRESULT CTitleBarHelper::OnNcHitTest(CPoint pt)
return HTTOPRIGHT;
return HTTOP;
}
if (pt.x < rc.left + borderWidth)
return HTLEFT;
if (rc.right - borderWidth <= pt.x)
return HTRIGHT;
if (!AfxGetMainWnd()->IsZoomed())
{
if (pt.x < rc.left + borderWidth)
return HTLEFT;
if (rc.right - borderWidth <= pt.x)
return HTRIGHT;
}
if (pt.x < rc.left + leftMargin)
{
if (pt.x > rc.left + leftMargin * 2 / 3)
Expand Down

0 comments on commit 642f81f

Please sign in to comment.