diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-04-27 19:06:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-04-27 19:06:08 +0100 |
commit | 3f9d69ba12da6f2874631f6e426a7ef148ba4c82 (patch) | |
tree | e6930403420136db38882edfd320e2185c8bd1f0 /ui/console.c | |
parent | 0d81cdddaa40a1988b24657aeac19959cfad0fde (diff) | |
parent | 1a01716a307387e5cf1336f61a96f772dddadc90 (diff) | |
download | hqemu-3f9d69ba12da6f2874631f6e426a7ef148ba4c82.zip hqemu-3f9d69ba12da6f2874631f6e426a7ef148ba4c82.tar.gz |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150427-1' into staging
gtk: support text consoles without vte, bugfixes.
# gpg: Signature made Mon Apr 27 14:34:15 2015 BST using RSA key ID D3E87138
# 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>"
* remotes/kraxel/tags/pull-gtk-20150427-1:
gtk: Avoid accel key leakage into guest on console switch
gtk: Fix VTE focus grabbing
console/gtk: add qemu_console_get_label
gtk: bind to text terminal consoles too
gtk: handle switch_surface(NULL) properly
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c index b15ca87..2927513 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1788,6 +1788,21 @@ bool qemu_console_is_fixedsize(QemuConsole *con) return con && (con->console_type != TEXT_CONSOLE); } +char *qemu_console_get_label(QemuConsole *con) +{ + if (con->console_type == GRAPHIC_CONSOLE) { + if (con->device) { + return g_strdup(object_get_typename(con->device)); + } + return g_strdup("VGA"); + } else { + if (con->chr && con->chr->label) { + return g_strdup(con->chr->label); + } + return g_strdup_printf("vc%d", con->index); + } +} + int qemu_console_get_index(QemuConsole *con) { if (con == NULL) { |