mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:42:57 +00:00
[NtUser]
- Fix regression from r71846. See CORE-11479 for more details. svn path=/trunk/; revision=72180
This commit is contained in:
parent
6927d67350
commit
824b41c0b2
2 changed files with 34 additions and 4 deletions
|
@ -944,9 +944,12 @@ VOID UserDrawCaptionBar(
|
||||||
if (!(Style & WS_MINIMIZE))
|
if (!(Style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
/* Draw menu bar */
|
/* Draw menu bar */
|
||||||
if (HAS_MENU(pWnd, Style))
|
if (pWnd->state & WNDS_HASMENU)
|
||||||
{
|
{
|
||||||
CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
|
PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu)); // FIXME!
|
||||||
|
TempRect = CurrentRect;
|
||||||
|
TempRect.bottom = TempRect.top + menu->cyMenu; // Should be pWnd->spmenu->cyMenu;
|
||||||
|
CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExStyle & WS_EX_CLIENTEDGE)
|
if (ExStyle & WS_EX_CLIENTEDGE)
|
||||||
|
@ -1110,11 +1113,14 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
|
||||||
if (!(Style & WS_MINIMIZE))
|
if (!(Style & WS_MINIMIZE))
|
||||||
{
|
{
|
||||||
/* Draw menu bar */
|
/* Draw menu bar */
|
||||||
if (HAS_MENU(pWnd, Style))
|
if (pWnd->state & WNDS_HASMENU)
|
||||||
{
|
{
|
||||||
if (!(Flags & DC_NOSENDMSG))
|
if (!(Flags & DC_NOSENDMSG))
|
||||||
{
|
{
|
||||||
CurrentRect.top += MENU_DrawMenuBar(hDC, &CurrentRect, pWnd, FALSE);
|
PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu)); // FIXME!
|
||||||
|
TempRect = CurrentRect;
|
||||||
|
TempRect.bottom = TempRect.top + menu->cyMenu; // Should be pWnd->spmenu->cyMenu;
|
||||||
|
CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3595,6 +3595,30 @@ co_IntSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi, BOOL bAlte
|
||||||
else
|
else
|
||||||
Window->ExStyle &= ~WS_EX_WINDOWEDGE;
|
Window->ExStyle &= ~WS_EX_WINDOWEDGE;
|
||||||
|
|
||||||
|
if ((OldValue & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||||
|
{
|
||||||
|
if ((NewValue & (WS_CHILD | WS_POPUP)) != WS_CHILD)
|
||||||
|
{
|
||||||
|
//// From child to non-child it should be null already.
|
||||||
|
ERR("IDMenu going null! %d\n",Window->IDMenu);
|
||||||
|
Window->IDMenu = 0; // Window->spmenu = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((NewValue & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||||
|
{
|
||||||
|
PMENU pMenu = UserGetMenuObject(UlongToHandle(Window->IDMenu));
|
||||||
|
Window->state &= ~WNDS_HASMENU;
|
||||||
|
if (pMenu)
|
||||||
|
{
|
||||||
|
ERR("IDMenu released 0x%p\n",pMenu);
|
||||||
|
// ROS may not hold a lock after setting menu to window. But it should!
|
||||||
|
//IntReleaseMenuObject(pMenu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((Style.styleOld ^ Style.styleNew) & WS_VISIBLE)
|
if ((Style.styleOld ^ Style.styleNew) & WS_VISIBLE)
|
||||||
{
|
{
|
||||||
if (Style.styleOld & WS_VISIBLE) Window->head.pti->cVisWindows--;
|
if (Style.styleOld & WS_VISIBLE) Window->head.pti->cVisWindows--;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue