summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2015-04-21 18:16:38 (GMT)
committerPavel Grunt <pgrunt@redhat.com>2015-04-22 13:20:05 (GMT)
commit4219a7ec694e45c43315100dceaa5a5a8542cec9 (patch)
tree59a22136c8aebb02864fcd002bae145e276fbe79
parent41645a0eb594b3c847968642ee0bc13b5fc4e091 (diff)
downloadvirt-viewer-master.zip
virt-viewer-master.tar.gz
virt-viewer-master.tar.xz
virt-viewer-window: Set initial zoom only onceHEADmaster
It is not needed to do it more times as it may cause unnecessary resize events especially when leaving the fullscreen mode related: rhbz#1206460
-rw-r--r--src/virt-viewer-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 791ef23..5367029 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -110,6 +110,7 @@ struct _VirtViewerWindowPrivate {
gint zoomlevel;
gboolean fullscreen;
gchar *subtitle;
+ gboolean initial_zoom_set;
};
static void
@@ -1319,7 +1320,8 @@ display_show_hint(VirtViewerDisplay *display,
hint = (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY);
- if (hint && virt_viewer_display_get_enabled(display)) {
+ if (!self->priv->initial_zoom_set && hint && virt_viewer_display_get_enabled(display)) {
+ self->priv->initial_zoom_set = TRUE;
virt_viewer_window_set_zoom_level(self, self->priv->zoomlevel);
}