user32: Make sure the desktop window is created before caps enumeration.
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Jun 28 02:47:17 CDT 2010
This patch fixes the problem reported in the bug 21709.
---
dlls/user32/sysparams.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index e6d2386..7ac806f 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -2639,8 +2639,12 @@ INT WINAPI GetSystemMetrics( INT index )
switch (index)
{
case SM_CXSCREEN:
+ /* make sure the desktop window is created before caps enumeration */
+ GetDesktopWindow();
return GetDeviceCaps( get_display_dc(), HORZRES );
case SM_CYSCREEN:
+ /* make sure the desktop window is created before caps enumeration */
+ GetDesktopWindow();
return GetDeviceCaps( get_display_dc(), VERTRES );
case SM_CXVSCROLL:
if (!spi_loaded[SPI_NONCLIENTMETRICS_IDX]) load_nonclient_metrics();
--
1.7.0.6
More information about the wine-patches
mailing list