[Spice-devel] [win32/vd_agent v2 3/3] make display disconnection persistent

Frediano Ziglio fziglio at redhat.com
Fri Mar 8 11:13:14 UTC 2019


> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1477191
> Currently on Win10 when one of multiple displays is
> disconnected by the client, the qxl-wddm-dod driver
> does not receive any update, the system just stops using
> this adapter for rendering. As a result, the 'disconnected'
> state of the adapter is not saved anywhere. On further
> connect the client side recognize the adapter as active
> and opens window for it. Current commit fixes the problem
> by sending QXL_ESCAPE_MONITOR_CONFIG with zero area
> to disabled adapter.
> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich at daynix.com>
> ---
>  vdagent/display_configuration.cpp | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/vdagent/display_configuration.cpp
> b/vdagent/display_configuration.cpp
> index 420836b..f0fbb77 100644
> --- a/vdagent/display_configuration.cpp
> +++ b/vdagent/display_configuration.cpp
> @@ -440,7 +440,10 @@ bool WDDMInterface::is_attached(DISPLAY_DEVICE*
> dev_info)
>  
>  bool WDDMInterface::set_monitor_state(LPCTSTR device_name, DEVMODE*
>  dev_mode, MONITOR_STATE state)
>  {
> -   return  _ccd.set_path_state(device_name, state);
> +    if (_ccd.is_attached(device_name) && state == MONITOR_DETACHED) {
> +        turn_monitor_off(device_name);
> +    }
> +    return  _ccd.set_path_state(device_name, state);
>  }
>  
>  bool WDDMInterface::custom_display_escape(LPCTSTR device_name, DEVMODE*
>  dev_mode)

Acked-by: Frediano Ziglio <fziglio at redhat.com>

Frediano


More information about the Spice-devel mailing list