diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-03-05 16:22:08 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-07 20:33:12 +0100 |
commit | 81cdc2447041f7ce49e59750f7281bb2224c0d0e (patch) | |
tree | 3c51c3a1bb2523e6a0ccbab7682cc80e88d45b36 | |
parent | 1b48cd0c0eee4500275ed839d0aa7a9eaaa61c0b (diff) |
virt-viewer-window: Move checks before resize to virt_viewer_window_resize
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | 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 2153eab..d8e6a6e 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; } |