summary refs log tree commit diff stats
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-10-01 15:44:30 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-10-01 15:44:30 +0100
commita2ef4d9e95400cd387ab4ae19a317741e458fb07 (patch)
tree9f459ad57b06799ad83de5885fdbdb60dc76b295 /ui/gtk.c
parent24c3833717d2528b98833bb5ebf4397a5512043f (diff)
parente8b1386ea1719525a1a92df03377764703fe8c64 (diff)
downloadfocaccia-qemu-a2ef4d9e95400cd387ab4ae19a317741e458fb07.tar.gz
focaccia-qemu-a2ef4d9e95400cd387ab4ae19a317741e458fb07.zip
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20181001-pull-request' into staging
ui: some small fixes/improvements.

# gpg: Signature made Mon 01 Oct 2018 11:42:16 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20181001-pull-request:
  gtk: add zoom-to-fit to gtk options.
  vnc: call sasl_server_init() only when required
  sdl2: show console #0 unconditionally

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 5cce6ed42d..3ddb5fe162 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2136,6 +2136,8 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
                               QemuConsole *con, int idx,
                               GSList *group, GtkWidget *view_menu)
 {
+    bool zoom_to_fit;
+
     vc->label = qemu_console_get_label(con);
     vc->s = s;
     vc->gfx.scale_x = 1.0;
@@ -2199,6 +2201,12 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
     group = gd_vc_menu_init(s, vc, idx, group, view_menu);
 
     if (dpy_ui_info_supported(vc->gfx.dcl.con)) {
+        zoom_to_fit = true;
+    }
+    if (s->opts->u.gtk.has_zoom_to_fit) {
+        zoom_to_fit = s->opts->u.gtk.zoom_to_fit;
+    }
+    if (zoom_to_fit) {
         gtk_menu_item_activate(GTK_MENU_ITEM(s->zoom_fit_item));
         s->free_scale = true;
     }