1 From 3d7082366da50e6abd00a20b4b350b4ff6205231 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 ca3698e..429b4b6 100644
12 --- a/programs/explorer/appbar.c
13 +++ b/programs/explorer/appbar.c
14 @@ -133,6 +133,41 @@ static void appbar_cliprect( HWND hwnd, RECT *rect )
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, struct appbar_data_msg *abd)
55 struct appbar_data* data;
56 @@ -167,6 +202,8 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd)
57 send_poschanged(hwnd);
59 HeapFree(GetProcessHeap(), 0, data);
64 WINE_WARN("removing hwnd %p not on the list\n", hwnd);
65 @@ -194,6 +231,8 @@ static UINT_PTR handle_appbarmessage(DWORD msg, struct appbar_data_msg *abd)
66 data->edge = abd->uEdge;
68 data->space_reserved = TRUE;