[WIN32SS][NTUSER] Fix popup menu window styles (#1814)

Fix the class style, the window style and the extended style of the popup menu window. CORE-16244
This commit is contained in:
Katayama Hirofumi MZ 2019-08-10 08:33:25 +09:00 committed by GitHub
parent 75623bb1fa
commit 0749a868fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -53,7 +53,7 @@ REGISTER_SYSCLASS DefaultServerClasses[] =
ICLS_SWITCH
},
{ ((PWSTR)((ULONG_PTR)(WORD)(0x8000))),
CS_DBLCLKS|CS_SAVEBITS,
CS_DBLCLKS|CS_SAVEBITS|CS_DROPSHADOW,
NULL, // Use User32 procs
sizeof(LONG),
(HICON)OCR_NORMAL,

View file

@ -2794,21 +2794,20 @@ static BOOL MENU_InitPopup( PWND pWndOwner, PMENU menu, UINT flags )
CREATESTRUCTW Cs;
LARGE_STRING WindowName;
UNICODE_STRING ClassName;
DWORD ex_style = WS_EX_TOOLWINDOW;
DWORD ex_style = WS_EX_PALETTEWINDOW | WS_EX_DLGMODALFRAME;
TRACE("owner=%p hmenu=%p\n", pWndOwner, menu);
menu->spwndNotify = pWndOwner;
if (flags & TPM_LAYOUTRTL || pWndOwner->ExStyle & WS_EX_LAYOUTRTL)
ex_style = WS_EX_LAYOUTRTL;
ex_style |= WS_EX_LAYOUTRTL;
ClassName.Buffer = WC_MENU;
ClassName.Length = 0;
RtlInitUnicodeString(&ClassName, WC_MENU);
RtlZeroMemory(&WindowName, sizeof(WindowName));
RtlZeroMemory(&Cs, sizeof(Cs));
Cs.style = WS_POPUP;
Cs.style = WS_POPUP | WS_CLIPSIBLINGS | WS_BORDER;
Cs.dwExStyle = ex_style;
Cs.hInstance = hModClient; // hModuleWin; // Server side winproc!
Cs.lpszName = (LPCWSTR) &WindowName;