user32: Implement SystemParametersInfo(SPI_GETWORKAREA) properly.
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Sep 10 23:20:15 CDT 2008
---
dlls/user32/sysparams.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index 6e260ea..fc5785a 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -1139,6 +1139,19 @@ static void load_nonclient_metrics(void)
spi_loaded[SPI_NONCLIENTMETRICS_IDX] = TRUE;
}
+static BOOL CALLBACK enum_monitors( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp )
+{
+ MONITORINFO mi;
+
+ mi.cbSize = sizeof(mi);
+ if (GetMonitorInfoW( monitor, &mi ) && (mi.dwFlags & MONITORINFOF_PRIMARY))
+ {
+ LPRECT work = (LPRECT)lp;
+ *work = mi.rcWork;
+ return FALSE;
+ }
+ return TRUE;
+}
/***********************************************************************
* SystemParametersInfoW (USER32.@)
@@ -1725,10 +1738,11 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
SetRect( &work_area, 0, 0,
GetSystemMetrics( SM_CXSCREEN ),
GetSystemMetrics( SM_CYSCREEN ) );
+ EnumDisplayMonitors( 0, NULL, enum_monitors, (LPARAM)&work_area );
spi_loaded[spi_idx] = TRUE;
}
CopyRect( (RECT *)pvParam, &work_area );
-
+ TRACE("work area %s\n", wine_dbgstr_rect( &work_area ));
break;
}
--
1.6.0.1
More information about the wine-patches
mailing list