Commit 76326ed3 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Only consider active monitors in monitor_from_rect.

parent f7788fc7
......@@ -3564,10 +3564,11 @@ HMONITOR monitor_from_rect( const RECT *rect, UINT flags, UINT dpi )
LIST_FOR_EACH_ENTRY(monitor, &monitors, struct monitor, entry)
{
RECT intersect;
RECT monitor_rect = map_dpi_rect( monitor->rc_monitor, get_monitor_dpi( monitor->handle ),
system_dpi );
RECT intersect, monitor_rect;
if (!(monitor->dev.state_flags & DISPLAY_DEVICE_ACTIVE)) continue;
monitor_rect = map_dpi_rect( monitor->rc_monitor, get_monitor_dpi( monitor->handle ), system_dpi );
if (intersect_rect( &intersect, &monitor_rect, &r ))
{
/* check for larger intersecting area */
......
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