mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-11 18:37:34 +00:00
virt-viewer-window: Set initial zoom only once
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
This commit is contained in:
parent
41645a0eb5
commit
4219a7ec69
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user