mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
user32: Update exstyle when setting style in SetWindowLong.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
94c1a67f78
commit
a9eee150ad
2 changed files with 9 additions and 11 deletions
|
@ -4548,8 +4548,7 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
|
||||||
else
|
else
|
||||||
dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE;
|
dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE;
|
||||||
ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
|
ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
|
||||||
todo_wine_if (!dwStyleIn)
|
ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
|
||||||
ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
|
|
||||||
|
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
if (hwndParent) DestroyWindow(hwndParent);
|
if (hwndParent) DestroyWindow(hwndParent);
|
||||||
|
@ -4701,7 +4700,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
|
||||||
WORD class_atom;
|
WORD class_atom;
|
||||||
WCHAR caption[1];
|
WCHAR caption[1];
|
||||||
} dlg_data;
|
} dlg_data;
|
||||||
DWORD style, ex_style, ex_style_out2;
|
DWORD style, ex_style;
|
||||||
HWND hwnd, grand_parent = 0, parent = 0;
|
HWND hwnd, grand_parent = 0, parent = 0;
|
||||||
struct dialog_param param;
|
struct dialog_param param;
|
||||||
|
|
||||||
|
@ -4763,13 +4762,12 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
|
||||||
ok(style == style_out, "expected style %#x, got %#x\n", style_out, style);
|
ok(style == style_out, "expected style %#x, got %#x\n", style_out, style);
|
||||||
/* WS_EX_WINDOWEDGE can't always be changed */
|
/* WS_EX_WINDOWEDGE can't always be changed */
|
||||||
if (ex_style_in & WS_EX_DLGMODALFRAME)
|
if (ex_style_in & WS_EX_DLGMODALFRAME)
|
||||||
ex_style_out2 = ex_style_in | WS_EX_WINDOWEDGE;
|
ex_style_out = ex_style_in | WS_EX_WINDOWEDGE;
|
||||||
else if ((style & (WS_DLGFRAME | WS_THICKFRAME)) && !(ex_style_in & WS_EX_STATICEDGE))
|
else if ((style & (WS_DLGFRAME | WS_THICKFRAME)) && !(ex_style_in & WS_EX_STATICEDGE))
|
||||||
ex_style_out2 = ex_style_in | WS_EX_WINDOWEDGE;
|
ex_style_out = ex_style_in | WS_EX_WINDOWEDGE;
|
||||||
else
|
else
|
||||||
ex_style_out2 = ex_style_in & ~WS_EX_WINDOWEDGE;
|
ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE;
|
||||||
todo_wine_if (ex_style_out != ex_style_out2)
|
ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style);
|
||||||
ok(ex_style == ex_style_out2, "expected ex_style %#x, got %#x\n", ex_style_out2, ex_style);
|
|
||||||
|
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
|
|
||||||
|
|
|
@ -2619,8 +2619,6 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B
|
||||||
if (wndPtr->parent == GetDesktopWindow()) newval |= WS_CLIPSIBLINGS;
|
if (wndPtr->parent == GetDesktopWindow()) newval |= WS_CLIPSIBLINGS;
|
||||||
/* WS_MINIMIZE can't be reset */
|
/* WS_MINIMIZE can't be reset */
|
||||||
if (wndPtr->dwStyle & WS_MINIMIZE) newval |= WS_MINIMIZE;
|
if (wndPtr->dwStyle & WS_MINIMIZE) newval |= WS_MINIMIZE;
|
||||||
/* FIXME: changing WS_DLGFRAME | WS_THICKFRAME is supposed to change
|
|
||||||
WS_EX_WINDOWEDGE too */
|
|
||||||
break;
|
break;
|
||||||
case GWL_EXSTYLE:
|
case GWL_EXSTYLE:
|
||||||
style.styleOld = wndPtr->dwExStyle;
|
style.styleOld = wndPtr->dwExStyle;
|
||||||
|
@ -2699,8 +2697,9 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case GWL_STYLE:
|
case GWL_STYLE:
|
||||||
req->flags = SET_WIN_STYLE;
|
req->flags = SET_WIN_STYLE | SET_WIN_EXSTYLE;
|
||||||
req->style = newval;
|
req->style = newval;
|
||||||
|
req->ex_style = fix_exstyle(newval, wndPtr->dwExStyle);
|
||||||
break;
|
break;
|
||||||
case GWL_EXSTYLE:
|
case GWL_EXSTYLE:
|
||||||
req->flags = SET_WIN_EXSTYLE;
|
req->flags = SET_WIN_EXSTYLE;
|
||||||
|
@ -2734,6 +2733,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B
|
||||||
{
|
{
|
||||||
case GWL_STYLE:
|
case GWL_STYLE:
|
||||||
wndPtr->dwStyle = newval;
|
wndPtr->dwStyle = newval;
|
||||||
|
wndPtr->dwExStyle = fix_exstyle(wndPtr->dwStyle, wndPtr->dwExStyle);
|
||||||
retval = reply->old_style;
|
retval = reply->old_style;
|
||||||
break;
|
break;
|
||||||
case GWL_EXSTYLE:
|
case GWL_EXSTYLE:
|
||||||
|
|
Loading…
Reference in a new issue