[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH 1/2] Avoid extra zoom-level property notifications



That sounds reasonable, ack

----- Original Message -----
> When setting a display's zoom level to the same level as the current setting,
> return early so that we don't notify about a property change
> ---
>  src/virt-viewer-display.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
> index efae385..b6ef018 100644
> --- a/src/virt-viewer-display.c
> +++ b/src/virt-viewer-display.c
> @@ -581,6 +581,10 @@ void
> virt_viewer_display_set_zoom_level(VirtViewerDisplay *display,
>          zoom = MIN_ZOOM_LEVEL;
>      if (zoom > MAX_ZOOM_LEVEL)
>          zoom = MAX_ZOOM_LEVEL;
> +
> +    if (priv->zoom_level == zoom)
> +        return;
> +
>      priv->zoom_level = zoom;
>  
>      virt_viewer_display_queue_resize(display);
> --
> 1.8.3.1
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list redhat com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]