user32: Fix MonitorFromRect to cope with the absence of the MONITOR_DEFAULTTONEAREST...
authorRob Shearman <rob@codeweavers.com>
Fri, 15 Feb 2008 15:22:44 +0000 (15:22 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Sat, 16 Feb 2008 13:58:14 +0000 (14:58 +0100)
commit386427e73901f2d520c583ff9fae3ad2642c1a22
tree96468524f5594bdc4266f13df1a61b8d3fd06d8e
parenta82f4dd9b77d5d880b948ceef213fb36ece10461
user32: Fix MonitorFromRect to cope with the absence of the MONITOR_DEFAULTTONEAREST flag.

Previously, the code would return any monitor found, regardless of
whether it intersected the given rect or was the nearest monitor. This
is fixed by adding a new flag that causes monitor_enum to only find the
nearest monitor if MONITOR_DEFAULTTONEAREST is specified.

Also add a trace for MonitorFromWindow, since it is called in many
places within user32 and so can't be traced using a relay trace.
dlls/user32/misc.c