win32u: Skip detached monitors in is_window_rect_full_screen().

Fix a regression from ee405dd. After ee405dd, 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.
This commit is contained in:
Zhiyi Zhang 2022-11-02 17:22:06 +08:00 committed by Alexandre Julliard
parent 5d21966b9f
commit 00ae070cd1

View file

@ -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)
{