Commit 00ae070c authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

win32u: Skip detached monitors in is_window_rect_full_screen().

Fix a regression from ee405dd8. After ee405dd8, is_window_rect_full_screen() may compare window rectangles against the empty rectangles of detached monitors. For example, is_window_rect_full_screen() can incorrectly return TRUE for a (0, 0, 1, 1) rectangle because 0 <= 0 && 1 >= 0 && 0 <= 0 && 1 >= 0 is true.
parent 5d21966b
......@@ -1846,6 +1846,9 @@ static BOOL is_window_rect_full_screen( const RECT *rect )
LIST_FOR_EACH_ENTRY( monitor, &monitors, struct monitor, entry )
{
if (!(monitor->dev.state_flags & DISPLAY_DEVICE_ACTIVE))
continue;
if (rect->left <= monitor->rc_monitor.left && rect->right >= monitor->rc_monitor.right &&
rect->top <= monitor->rc_monitor.top && rect->bottom >= monitor->rc_monitor.bottom)
{
......
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