From 3f68641b92af719631464729a17d0d1268a8cdce Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Sat, 6 Dec 2008 12:43:03 -0600 Subject: [PATCH] explorer,shell32: Improve ABM_GETTASKBARPOS stub. --- dlls/shell32/appbar.c | 4 ++-- dlls/shell32/tests/appbar.c | 3 --- programs/explorer/appbar.c | 12 +++++++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/appbar.c b/dlls/shell32/appbar.c index a6834c1d83a..5f9c25f6099 100644 --- a/dlls/shell32/appbar.c +++ b/dlls/shell32/appbar.c @@ -46,7 +46,7 @@ struct appbar_cmd struct appbar_response { UINT_PTR result; - RECT rc; + APPBARDATA abd; }; /************************************************************************* @@ -112,7 +112,7 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) response = (struct appbar_response*)return_view; ret = response->result; - data->rc = response->rc; + *data = response->abd; UnmapViewOfFile(return_view); diff --git a/dlls/shell32/tests/appbar.c b/dlls/shell32/tests/appbar.c index af7c5f2cec2..d11a999b787 100644 --- a/dlls/shell32/tests/appbar.c +++ b/dlls/shell32/tests/appbar.c @@ -400,11 +400,8 @@ static void test_appbarget(void) if(ret) { ok(abd.hWnd == (HWND)0xcccccccc, "hWnd overwritten\n"); -todo_wine -{ ok(abd.uEdge <= ABE_BOTTOM, "uEdge not returned\n"); ok(abd.rc.left != 0xcccccccc, "rc not updated\n"); -} } return; diff --git a/programs/explorer/appbar.c b/programs/explorer/appbar.c index 810231819c2..6564f2c1543 100644 --- a/programs/explorer/appbar.c +++ b/programs/explorer/appbar.c @@ -47,7 +47,7 @@ struct appbar_cmd struct appbar_response { UINT_PTR result; - RECT rc; + APPBARDATA abd; }; static HWND appbarmsg_window = NULL; @@ -195,7 +195,13 @@ static UINT_PTR handle_appbarmessage(DWORD msg, PAPPBARDATA abd) return ABS_ALWAYSONTOP | ABS_AUTOHIDE; case ABM_GETTASKBARPOS: WINE_FIXME("SHAppBarMessage(ABM_GETTASKBARPOS, hwnd=%p): stub\n", abd->hWnd); - return FALSE; + /* Report the taskbar is at the bottom of the screen. */ + abd->rc.left = 0; + abd->rc.right = GetSystemMetrics(SM_CXSCREEN); + abd->rc.bottom = GetSystemMetrics(SM_CYSCREEN); + abd->rc.top = abd->rc.bottom-1; + abd->uEdge = ABE_BOTTOM; + return TRUE; case ABM_ACTIVATE: WINE_FIXME("SHAppBarMessage(ABM_ACTIVATE, hwnd=%p, lparam=%lx): stub\n", abd->hWnd, abd->lParam); return TRUE; @@ -256,7 +262,7 @@ LRESULT CALLBACK appbar_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara { response = (struct appbar_response*)return_view; response->result = result; - response->rc = cmd.abd.rc; + response->abd = cmd.abd; UnmapViewOfFile(return_view); }