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

Re: [virt-tools-list] [PATCH 2/4] virt-viewer-window: Move checks before resize to virt_viewer_window_resize



On Mon, Mar 05, 2012 at 04:22:08PM +0100, Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede redhat com>
> ---
>  src/virt-viewer-window.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 604bc97..f86b5b7 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -323,9 +323,7 @@ static void
>  virt_viewer_window_desktop_resize(VirtViewerDisplay *display G_GNUC_UNUSED,
>                                    VirtViewerWindow *self)
>  {
> -    VirtViewerWindowPrivate *priv = self->priv;
> -    if (priv->auto_resize && !priv->fullscreen)
> -        virt_viewer_window_resize(self);
> +    virt_viewer_window_resize(self);
>  }
>  
>  
> @@ -393,6 +391,9 @@ virt_viewer_window_resize(VirtViewerWindow *self)
>      guint desktopHeight;
>      VirtViewerWindowPrivate *priv = self->priv;
>  
> +    if (!priv->auto_resize || priv->fullscreen)
> +        return;
> +
>      DEBUG_LOG("Preparing main window resize");
>      if (!priv->display) {
>          DEBUG_LOG("Skipping inactive resize");
> @@ -679,8 +680,7 @@ virt_viewer_window_menu_view_resize(GtkWidget *menu,
>  
>      if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu))) {
>          priv->auto_resize = TRUE;
> -        if (!priv->fullscreen)
> -            virt_viewer_window_resize(self);
> +        virt_viewer_window_resize(self);
>      } else {
>          priv->auto_resize = FALSE;
>      }

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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