/*1* Explorer.exe tests2*3* Copyright 2022 Zhiyi Zhang for CodeWeavers4*5* This library is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public7* License as published by the Free Software Foundation; either8* version 2.1 of the License, or (at your option) any later version.9*10* This library is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* Lesser General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public16* License along with this library; if not, write to the Free Software17* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA18*/1920#include <windows.h>21#include "wine/test.h"2223static void test_taskbar(void)24{25RECT taskbar_rect, expected_rect, primary_rect, work_rect;26HWND hwnd;27BOOL ret;2829hwnd = FindWindowA("Shell_TrayWnd", NULL);30if (!hwnd)31{32skip("Failed to find the taskbar window.\n");33return;34}3536ret = GetWindowRect(hwnd, &taskbar_rect);37ok(ret, "GetWindowRect failed, error %ld.\n", GetLastError());3839SystemParametersInfoW(SPI_GETWORKAREA, 0, &work_rect, 0);40SetRect(&primary_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));41SubtractRect(&expected_rect, &primary_rect, &work_rect);4243/* In standalone mode, the systray window is floating */44todo_wine_if(!(GetWindowLongW(hwnd, GWL_STYLE) & WS_POPUP))45ok(EqualRect(&taskbar_rect, &expected_rect), "Expected %s, got %s.\n",46wine_dbgstr_rect(&expected_rect), wine_dbgstr_rect(&taskbar_rect));47}4849START_TEST(explorer)50{51test_taskbar();52}535455