[Spice-devel] [PATCH spice-gtk] main: do not send monitor config if monitor state didn't change

Hans de Goede hdegoede at redhat.com
Tue Apr 23 07:32:09 PDT 2013


ACK.

On 04/23/2013 02:48 PM, Marc-André Lureau wrote:
> Don't send monitor config after spice_main_set_display_enabled() if the
> monitor state didn't change.
>
> This solves monitor "flashing", reconfiguring in a loop:
> https://bugzilla.redhat.com/show_bug.cgi?id=952327
> ---
>   gtk/channel-main.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index 6d31ef5..3e63ea7 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -2299,6 +2299,8 @@ void spice_main_set_display_enabled(SpiceMainChannel *channel, int id, gboolean
>               c->display[i].enabled = enabled;
>       } else {
>           g_return_if_fail(id < G_N_ELEMENTS(c->display));
> +        if (c->display[id].enabled == enabled)
> +            return;
>           c->display[id].enabled = enabled;
>       }
>
>


More information about the Spice-devel mailing list