[PATCH v2 0/1] MR303: win32u: Don't report cloned monitors in EnumDisplayMonitors().

Jacek Caban (@jacek) wine at gitlab.winehq.org
Fri Jun 24 07:56:51 CDT 2022


Jacek Caban (@jacek) commented about dlls/win32u/sysparams.c:
>  
> +            is_cloned = FALSE;
> +            LIST_FOR_EACH_ENTRY(monitor2, &monitors, struct monitor, entry)
> +            {
> +                if (EqualRect(&monitor2->rc_monitor, &monitor->rc_monitor))
> +                {
> +                    is_cloned = TRUE;
> +                    break;
> +                }
> +            }
> +
> +            if (is_cloned)
> +            {
> +                free( monitor );
> +                continue;
> +            }
We will eventually want to move QueryDisplayConfig to win32u as well and it will need to be aware of mirrored monitors, so I think it's better to have them in the list. Note that most places should already handle that fine. I think it would be better to have a flag in monitor struct and skip mirrored monitors during monitor enumeration when appropriate.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/303#note_2645



More information about the wine-devel mailing list