Skip to content
Permalink
Browse files

gh-1849: SystemMenu does not appear if ConEmu is maximized.

  • Loading branch information...
Maximus5 committed Mar 26, 2019
1 parent 42052e6 commit 856948ee64089589326871884fb8a7c09e424ed1
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/ConEmu/TabBar.cpp
@@ -1285,9 +1285,15 @@ void CTabBarClass::OnCommand(WPARAM wParam, LPARAM lParam)
LogString(L"ToolBar: TID_SYSMENU");
RECT rcBtnRect = {0};
mp_Rebar->GetToolBtnRect(TID_SYSMENU, &rcBtnRect);
DWORD nAddFlags = ((gpSet->nTabsLocation == 1) ? TPM_BOTTOMALIGN : 0) | TPM_RIGHTALIGN;
const DWORD nAddFlags = ((gpSet->nTabsLocation == 1) ? TPM_BOTTOMALIGN : 0) | TPM_RIGHTALIGN;
MONITORINFO mi = {}; gpConEmu->GetNearestMonitor(&mi);
--mi.rcWork.right; --mi.rcWork.bottom;
RECT rcVisible = {}; const BOOL visible = IntersectRect(&rcVisible, &rcBtnRect, &mi.rcWork);
LogString(L"ShowSysmenu called from (ToolBar)");
gpConEmu->mp_Menu->ShowSysmenu(rcBtnRect.right,rcBtnRect.bottom, nAddFlags);
gpConEmu->mp_Menu->ShowSysmenu(
visible ? rcVisible.right : rcBtnRect.right,
visible ? rcVisible.bottom : rcBtnRect.bottom,
nAddFlags);
}
else
{

0 comments on commit 856948e

Please sign in to comment.
You can’t perform that action at this time.