https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0749a868fcae2f7c0963b…
commit 0749a868fcae2f7c0963b7cc010aa622d2515c6c
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat Aug 10 08:33:25 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Aug 10 08:33:25 2019 +0900
[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
---
win32ss/user/ntuser/class.c | 2 +-
win32ss/user/ntuser/menu.c | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/win32ss/user/ntuser/class.c b/win32ss/user/ntuser/class.c
index 5982d6b9e38..2bda75012d6 100644
--- a/win32ss/user/ntuser/class.c
+++ b/win32ss/user/ntuser/class.c
@@ -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,
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index a826ddbc58c..eef10076d1c 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -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;