Commit 2fef984e authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

user32: Treat empty rects as 1x1 in MonitorFromRect.

parent fc185ccd
......@@ -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)
{
......
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