[NTUSER] Fix popup menu positioning for Miranda IM (#6981)

CORE-17838
This commit is contained in:
Doug Lyons 2024-06-19 18:55:12 -05:00 committed by GitHub
parent 3fe12f1a7c
commit cd88a97115
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3023,7 +3023,14 @@ static BOOL FASTCALL MENU_ShowPopup(PWND pwndOwner, PMENU menu, UINT id, UINT fl
if ((y - height) < monitor->rcMonitor.top || y >= monitor->rcMonitor.bottom) if ((y - height) < monitor->rcMonitor.top || y >= monitor->rcMonitor.bottom)
y = monitor->rcMonitor.bottom - height; y = monitor->rcMonitor.bottom - height;
else else
y -= height; {
INT adjHgt = y + UserGetSystemMetrics(SM_CYMENUSIZE) +
2 * UserGetSystemMetrics(SM_CYDLGFRAME);
if (adjHgt >= monitor->rcMonitor.bottom)
y -= height;
else
y = adjHgt - height;
}
} }
if (pExclude) if (pExclude)