winemac.drv: Don't filter non active displays out.
On Windows 10 the DISPLAY_DEVICE_ACTIVE flag is set even if monitor is in power saving mode or switched off. Monitors without DISPLAY_DEVICE_ACTIVE are only reported when display is disabled. This doesn't match with CGDisplayIsActive function. Current code causes rendering problems when native .NET is used. When monitors are updated when in power saving mode (e.g. due to race on machine wake-up) we might end up with no monitors being enumerated by EnumDisplayMonitors. Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
129e5660e3
commit
5400db15ca
|
@ -646,16 +646,6 @@ int macdrv_get_monitors(uint32_t adapter_id, struct macdrv_monitor** new_monitor
|
|||
if (!monitors)
|
||||
return -1;
|
||||
|
||||
/* Report an inactive monitor */
|
||||
if (!CGDisplayIsActive(adapter_id) && !CGDisplayIsInMirrorSet(adapter_id))
|
||||
{
|
||||
strcpy(monitors[monitor_count].name, "Generic Non-PnP Monitor");
|
||||
monitors[monitor_count].state_flags = DISPLAY_DEVICE_ATTACHED;
|
||||
monitor_count++;
|
||||
}
|
||||
/* Report active and mirrored monitors in the same mirroring set */
|
||||
else
|
||||
{
|
||||
if (CGGetOnlineDisplayList(sizeof(display_ids) / sizeof(display_ids[0]), display_ids, &display_id_count)
|
||||
!= kCGErrorSuccess)
|
||||
goto done;
|
||||
|
@ -705,7 +695,6 @@ int macdrv_get_monitors(uint32_t adapter_id, struct macdrv_monitor** new_monitor
|
|||
monitors[0] = monitors[primary_index];
|
||||
monitors[primary_index] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
*new_monitors = monitors;
|
||||
*count = monitor_count;
|
||||
|
|
Loading…
Reference in New Issue