server: Treat desktop as a top-level window.
This commit is contained in:
parent
9380eb3127
commit
dcdf7c55d6
|
@ -9250,7 +9250,7 @@ static void test_SetForegroundWindow(void)
|
|||
trace("SetForegroundWindow( GetDesktopWindow() )\n");
|
||||
SetForegroundWindow( GetDesktopWindow() );
|
||||
ok_sequence(SetForegroundWindowSeq, "SetForegroundWindow( desktop ) away from "
|
||||
"foreground top level window", TRUE);
|
||||
"foreground top level window", FALSE);
|
||||
trace("done\n");
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
|
|
@ -2213,12 +2213,9 @@ static void test_SetForegroundWindow(HWND hwnd)
|
|||
|
||||
hwnd2 = GetForegroundWindow();
|
||||
ok(hwnd2 == hwnd, "Wrong foreground window %p\n", hwnd2);
|
||||
todo_wine
|
||||
{
|
||||
ok(SetForegroundWindow( GetDesktopWindow() ), "SetForegroundWindow(desktop) error: %d\n", GetLastError());
|
||||
hwnd2 = GetForegroundWindow();
|
||||
ok(hwnd2 != hwnd, "Wrong foreground window %p\n", hwnd2);
|
||||
}
|
||||
|
||||
ShowWindow(hwnd, SW_HIDE);
|
||||
check_wnd_state(0, 0, 0, 0);
|
||||
|
|
|
@ -514,7 +514,7 @@ int is_child_window( user_handle_t parent, user_handle_t child )
|
|||
int is_top_level_window( user_handle_t window )
|
||||
{
|
||||
struct window *win = get_user_object( window, USER_WINDOW );
|
||||
return (win && win->parent && is_desktop_window(win->parent));
|
||||
return (win && (is_desktop_window(win) || is_desktop_window(win->parent)));
|
||||
}
|
||||
|
||||
/* make a window active if possible */
|
||||
|
|
Loading…
Reference in New Issue