diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-14 07:51:45 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-14 07:51:45 -0500 |
commit | 301255e6303457e10b9a42dc208f80c058004c1c (patch) | |
tree | bd9052fb0bf7e87f6e4913c9646ffcc18413fd93 /ui/gtk.c | |
parent | 5f13731f8cb6aadecf214513ec810d61dc1f71dc (diff) | |
parent | ba275adba09adfc0f7ec533f1fddba678d9ba826 (diff) | |
download | qemu-301255e6303457e10b9a42dc208f80c058004c1c.zip qemu-301255e6303457e10b9a42dc208f80c058004c1c.tar.gz qemu-301255e6303457e10b9a42dc208f80c058004c1c.tar.bz2 |
Merge remote-tracking branch 'mjt/trivial-patches-next' into staging
# By Michael Tokarev (4) and others
# Via Michael Tokarev
* mjt/trivial-patches-next: (26 commits)
piix: fix some printf errors when debug is enabled
cputlb: fix debug logs
create qemu_openpty_raw() helper function and move it to a separate file
main-loop: do not include slirp/slirp.h, use libslirp.h instead
libcacard/vscclient: fix leakage of socket on error paths
linux-headers: Update to v3.10-rc5
KVM: PPC: Add dummy kvm_arch_init_irq_routing()
KVM: S390: Add dummy kvm_arch_init_irq_routing()
KVM: ARM: Add dummy kvm_arch_init_irq_routing()
ivshmem: add missing error exit(2)
hw/xen: Use g_free instead of free and fix potential memory leaks
target-sparc: Replace free by g_free
hw/scsi: Don't increment a boolean value
device tree: Fix cppcheck warning
Makefile: Install qemu-img and qemu-nbd man pages only if built
Unbreak -no-quit for GTK, validate SDL options
gtk: implement -full-screen
char/serial: serial_ioport_write: Factor out common code
char/serial: Use generic Fifo8
char/serial: cosmetic fixes.
...
Message-id: 1371207042-17980-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r-- | ui/gtk.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -1160,8 +1160,7 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL GIOChannel *chan; GtkWidget *scrolled_window; GtkAdjustment *vadjustment; - int master_fd, slave_fd, ret; - struct termios tty; + int master_fd, slave_fd; snprintf(buffer, sizeof(buffer), "vc%d", index); snprintf(path, sizeof(path), "<QEMU>/View/VC%d", index); @@ -1181,13 +1180,8 @@ static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSL vc->terminal = vte_terminal_new(); - ret = openpty(&master_fd, &slave_fd, NULL, NULL, NULL); - g_assert(ret != -1); - - /* Set raw attributes on the pty. */ - tcgetattr(slave_fd, &tty); - cfmakeraw(&tty); - tcsetattr(slave_fd, TCSAFLUSH, &tty); + master_fd = qemu_openpty_raw(&slave_fd, NULL); + g_assert(master_fd != -1); #if VTE_CHECK_VERSION(0, 26, 0) pty = vte_pty_new_foreign(master_fd, NULL); @@ -1435,7 +1429,7 @@ static const DisplayChangeListenerOps dcl_ops = { .dpy_cursor_define = gd_cursor_define, }; -void gtk_display_init(DisplayState *ds) +void gtk_display_init(DisplayState *ds, bool full_screen) { GtkDisplayState *s = g_malloc0(sizeof(*s)); char *filename; @@ -1511,6 +1505,10 @@ void gtk_display_init(DisplayState *ds) gtk_widget_show_all(s->window); + if (full_screen) { + gtk_menu_item_activate(GTK_MENU_ITEM(s->full_screen_item)); + } + register_displaychangelistener(&s->dcl); global_state = s; |