user32: Fix style passed to HCBT_CREATEWND hook.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
08f60ee991
commit
1b6f8a1adb
|
@ -1222,6 +1222,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
/* WS_VISIBLE should be turned off yet */
|
/* WS_VISIBLE should be turned off yet */
|
||||||
style = createwnd->lpcs->style & ~WS_VISIBLE;
|
style = createwnd->lpcs->style & ~WS_VISIBLE;
|
||||||
|
todo_wine_if(!(style & WS_CLIPSIBLINGS) && (!(style & WS_CHILD) || (style & WS_POPUP)))
|
||||||
ok(style == GetWindowLongA(hwnd, GWL_STYLE),
|
ok(style == GetWindowLongA(hwnd, GWL_STYLE),
|
||||||
"style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n",
|
"style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n",
|
||||||
GetWindowLongA(hwnd, GWL_STYLE), style);
|
GetWindowLongA(hwnd, GWL_STYLE), style);
|
||||||
|
@ -4444,7 +4445,6 @@ static LRESULT WINAPI cbt_proc(int ncode, WPARAM wparam, LPARAM lparam)
|
||||||
|
|
||||||
ts = c->lpcs->lpCreateParams;
|
ts = c->lpcs->lpCreateParams;
|
||||||
ok(ts != NULL, "lpCreateParams not set\n");
|
ok(ts != NULL, "lpCreateParams not set\n");
|
||||||
todo_wine_if(!(ts->cs_style & WS_CHILD) || (ts->cs_style & WS_POPUP))
|
|
||||||
ok(c->lpcs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n",
|
ok(c->lpcs->style == ts->cs_style, "style = 0x%08x, expected 0x%08x\n",
|
||||||
c->lpcs->style, ts->cs_style);
|
c->lpcs->style, ts->cs_style);
|
||||||
ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n",
|
ok(c->lpcs->dwExStyle == ts->cs_exstyle, "exstyle = 0x%08x, expected 0x%08x\n",
|
||||||
|
|
|
@ -1706,7 +1706,6 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
|
||||||
}
|
}
|
||||||
else SetWindowLongPtrW( hwnd, GWLP_ID, (ULONG_PTR)cs->hMenu );
|
else SetWindowLongPtrW( hwnd, GWLP_ID, (ULONG_PTR)cs->hMenu );
|
||||||
|
|
||||||
style = wndPtr->dwStyle;
|
|
||||||
win_dpi = wndPtr->dpi;
|
win_dpi = wndPtr->dpi;
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
|
|
||||||
|
@ -1716,12 +1715,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
|
||||||
|
|
||||||
/* call the WH_CBT hook */
|
/* call the WH_CBT hook */
|
||||||
|
|
||||||
/* the window style passed to the hook must be the real window style,
|
|
||||||
* rather than just the window style that the caller to CreateWindowEx
|
|
||||||
* passed in, so we have to copy the original CREATESTRUCT and get the
|
|
||||||
* the real style. */
|
|
||||||
cbcs = *cs;
|
cbcs = *cs;
|
||||||
cbcs.style = style;
|
|
||||||
cbtc.lpcs = &cbcs;
|
cbtc.lpcs = &cbcs;
|
||||||
cbtc.hwndInsertAfter = HWND_TOP;
|
cbtc.hwndInsertAfter = HWND_TOP;
|
||||||
if (HOOK_CallHooks( WH_CBT, HCBT_CREATEWND, (WPARAM)hwnd, (LPARAM)&cbtc, unicode )) goto failed;
|
if (HOOK_CallHooks( WH_CBT, HCBT_CREATEWND, (WPARAM)hwnd, (LPARAM)&cbtc, unicode )) goto failed;
|
||||||
|
|
Loading…
Reference in New Issue