Commit dcdf7c55 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

server: Treat desktop as a top-level window.

parent 9380eb31
......@@ -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 */
......
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