user32: Don't allow changing the WS_EX_TOPMOST style with SetWindowLong.
This commit is contained in:
parent
917f288f1b
commit
ebc6864953
|
@ -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");
|
||||
}
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue