mirror of
https://github.com/reactos/reactos.git
synced 2025-06-19 15:25:28 +00:00
[RSHELL]
* CMenuDeskBar: Actually use the Popup flags to decide on the relative position of the submenus. CORE-7886 svn path=/branches/shell-experiments/; revision=62296
This commit is contained in:
parent
905ab8ebba
commit
dcbd65feca
2 changed files with 31 additions and 14 deletions
|
@ -399,8 +399,6 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::Popup(POINTL *ppt, RECTL *prcExclude, MP
|
|||
return hr;
|
||||
|
||||
::AdjustWindowRect(&rc, ::GetWindowLong(m_hWnd, GWL_STYLE), FALSE);
|
||||
rc.right -= rc.left;
|
||||
rc.bottom -= rc.top;
|
||||
|
||||
if (m_Banner != NULL)
|
||||
{
|
||||
|
@ -409,16 +407,36 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::Popup(POINTL *ppt, RECTL *prcExclude, MP
|
|||
rc.right += bm.bmWidth;
|
||||
}
|
||||
|
||||
int x = ppt->x;
|
||||
int y = ppt->y - rc.bottom;
|
||||
int cx = rc.right;
|
||||
int cy = rc.bottom;
|
||||
int x, y, cx, cy;
|
||||
|
||||
RECT rcWorkArea;
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, 0);
|
||||
|
||||
int waHeight = rcWorkArea.bottom - rcWorkArea.top;
|
||||
|
||||
switch (dwFlags & MPPF_POS_MASK)
|
||||
{
|
||||
case MPPF_LEFT:
|
||||
case MPPF_TOP:
|
||||
x = ppt->x - rc.right;
|
||||
cx = rc.right - rc.left;
|
||||
break;
|
||||
default:
|
||||
x = ppt->x;
|
||||
cx = rc.right - rc.left;
|
||||
break;
|
||||
}
|
||||
|
||||
if (dwFlags & MPPF_BOTTOM)
|
||||
{
|
||||
y = ppt->y - rc.bottom;
|
||||
cy = rc.bottom - rc.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = ppt->y + rc.top;
|
||||
cy = rc.bottom - rc.top;
|
||||
}
|
||||
|
||||
if (y < rcWorkArea.top)
|
||||
{
|
||||
y = rcWorkArea.top;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue