Commit eb5127df authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Create the desktop window before enumerating monitors.

parent 209d1a86
......@@ -351,9 +351,6 @@ HMONITOR WINAPI MonitorFromRect( LPRECT rect, DWORD flags )
{
struct monitor_enum_info info;
/* make sure the desktop window exists */
GetDesktopWindow();
info.rect = *rect;
info.max_area = 0;
info.min_distance = ~0u;
......@@ -444,6 +441,9 @@ BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
*/
BOOL WINAPI EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
{
/* make sure the desktop window exists */
GetDesktopWindow();
return USER_Driver->pEnumDisplayMonitors( hdc, rect, proc, lp );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment