user32: Treat empty rects as 1x1 in MonitorFromRect.

This commit is contained in:
Vincent Povirk 2014-01-08 16:02:23 -06:00 committed by Alexandre Julliard
parent fc185ccd9b
commit 2fef984ed5
1 changed files with 7 additions and 0 deletions

View File

@ -359,6 +359,13 @@ HMONITOR WINAPI MonitorFromRect( LPRECT rect, DWORD flags )
info.primary = 0;
info.nearest = 0;
info.ret = 0;
if (IsRectEmpty(&info.rect))
{
info.rect.right = info.rect.left + 1;
info.rect.bottom = info.rect.top + 1;
}
if (!EnumDisplayMonitors( 0, NULL, monitor_enum, (LPARAM)&info )) return 0;
if (!info.ret)
{