[virt-tools-list] [PATCH 1/2] Avoid extra zoom-level property notifications
Marc-André Lureau
mlureau at redhat.com
Wed Oct 9 15:03:33 UTC 2013
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 at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
>
More information about the virt-tools-list
mailing list