Commit ebc68649 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Don't allow changing the WS_EX_TOPMOST style with SetWindowLong.

parent 917f288f
......@@ -993,12 +993,9 @@ static void test_shell_window(void)
/* passes on Win XP, but not on Win98
ok(!ret, "third call to SetShellWindow(hwnd1)\n"); */
todo_wine
{
SetWindowLong(hwnd1, GWL_EXSTYLE, GetWindowLong(hwnd1,GWL_EXSTYLE)|WS_EX_TOPMOST);
ret = GetWindowLong(hwnd1,GWL_EXSTYLE)&WS_EX_TOPMOST? TRUE: FALSE;
ok(!ret, "SetWindowExStyle(hwnd1, WS_EX_TOPMOST)\n");
}
ret = DestroyWindow(hwnd1);
ok(ret, "DestroyWindow(hwnd1)\n");
......
......@@ -1945,6 +1945,8 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B
break;
case GWL_EXSTYLE:
req->flags = SET_WIN_EXSTYLE;
/* WS_EX_TOPMOST can only be changed through SetWindowPos */
newval = (newval & ~WS_EX_TOPMOST) | (wndPtr->dwExStyle & WS_EX_TOPMOST);
req->ex_style = newval;
break;
case GWLP_ID:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment