1 From 1d88260bf6b653d0b3e7edc804cbb5f2742ec1af Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Tue, 23 Sep 2008 16:23:04 -0500
4 Subject: [PATCH] explorer: set the work area when appbars change
7 programs/explorer/appbar.c | 39 +++++++++++++++++++++++++++++++++++++++
8 1 files changed, 39 insertions(+), 0 deletions(-)
10 diff --git a/programs/explorer/appbar.c b/programs/explorer/appbar.c
11 index f6e1eb1..733e7bf 100644
12 --- a/programs/explorer/appbar.c
13 +++ b/programs/explorer/appbar.c
14 @@ -124,6 +124,41 @@ static void appbar_cliprect(PAPPBARDATA abd)
18 +static void refresh_workarea(void)
20 + struct appbar_data* data;
25 + rc.right = GetSystemMetrics(SM_CXSCREEN);
26 + rc.bottom = GetSystemMetrics(SM_CYSCREEN);
28 + LIST_FOR_EACH_ENTRY(data, &appbars, struct appbar_data, entry)
30 + if (data->space_reserved)
35 + rc.bottom = min(rc.bottom, data->rc.top);
38 + rc.left = max(rc.left, data->rc.right);
41 + rc.right = min(rc.right, data->rc.left);
44 + rc.top = max(rc.top, data->rc.bottom);
50 + SystemParametersInfoW(SPI_SETWORKAREA, 0, (void*)&rc, 0);
53 static UINT_PTR handle_appbarmessage(DWORD msg, PAPPBARDATA abd)
55 struct appbar_data* data;
56 @@ -157,6 +192,8 @@ static UINT_PTR handle_appbarmessage(DWORD msg, PAPPBARDATA abd)
57 send_poschanged(abd->hWnd);
59 HeapFree(GetProcessHeap(), 0, data);
64 WINE_WARN("removing hwnd %p not on the list\n", abd->hWnd);
65 @@ -184,6 +221,8 @@ static UINT_PTR handle_appbarmessage(DWORD msg, PAPPBARDATA abd)
66 data->edge = abd->uEdge;
68 data->space_reserved = TRUE;