summaryrefslogtreecommitdiff
path: root/ui/gtk.c
AgeCommit message (Collapse)AuthorFilesLines
2018-04-10gtk: drop pointless code from gd_window_closeGerd Hoffmann1-8/+0
Unregistering the display change listener looks like a pointless excercise given we'll exit in a moment. When exiting qemu via menu/file/quit this will not happen either. Just drop the code. Also return TRUE unconditionally. This will tell gtk to ignore the close request, so gtk will not start destroying widgets and causing warnings due to UI code trying to talk to widgets which are gone. Just depend on qmp_quit() doing it's job instead. Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20180314080439.4229-1-kraxel@redhat.com>
2018-04-09ui: add ctrl modifier support to kbd_put_qcode_console()Gerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180321135041.15768-2-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-03-12ui/gtk-egl: add cursor_dmabuf supportGerd Hoffmann1-0/+2
Add support for cursor dmabufs to gtk-egl. Just blend in the cursor (if we have one) when rendering the dmabuf. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306090951.22932-7-kraxel@redhat.com
2018-03-12ui/gtk-egl: add scanout_dmabuf supportGerd Hoffmann1-0/+2
Add support for dmabuf scanouts to gtk-egl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306090951.22932-6-kraxel@redhat.com
2018-03-12ui/gtk: use GtkGlArea on wayland onlyGerd Hoffmann1-5/+8
For dma-buf support we need a egl context. The gtk x11 backend uses glx contexts though. We can't use the GtkGlArea widget on x11 because of that, so use our own gtk-egl code instead. wayland continues to use the GtkGlArea widget. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306090951.22932-5-kraxel@redhat.com
2018-03-12ui/gtk: make GtkGlArea usage a runtime optionGerd Hoffmann1-24/+29
Compile in both gtk-egl and gtk-gl-area, then allow to choose at runtime instead of compile time which opengl variant we want use. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306090951.22932-2-kraxel@redhat.com
2018-03-05Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180305-pull-request' ↵Peter Maydell1-2/+15
into staging ui: build curses, gtk and sdl as modules. # gpg: Signature made Mon 05 Mar 2018 08:48:24 GMT # 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-20180305-pull-request: ui/sdl: build as module audio: rename CONFIG_* to CONFIG_AUDIO_* ui/curses: build as module ui/gtk: build as module configure: opengl doesn't depend on x11 configure: add X11 vars to config-host.mak console: add ui module loading support console: add and use qemu_display_find_default egl-headless: switch over to new display registry curses: switch over to new display registry cocoa: switch over to new display registry sdl: switch over to new display registry console: add qemu display registry, add gtk Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-05console: add qemu display registry, add gtkGerd Hoffmann1-2/+15
Add a registry for user interfaces. Add qemu_display_init and qemu_display_early_init helper functions for display initialization. Hook up gtk ui as first user. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-2-kraxel@redhat.com
2018-03-02qapi: Empty out qapi-schema.jsonMarkus Armbruster1-1/+1
The previous commit improved compile time by including less of the generated QAPI headers. This is impossible for stuff defined directly in qapi-schema.json, because that ends up in headers that that pull in everything. Move everything but include directives from qapi-schema.json to new sub-module qapi/misc.json, then include just the "misc" shard where possible. It's possible everywhere, except: * monitor.c needs qmp-command.h to get qmp_init_marshal() * monitor.c, ui/vnc.c and the generated qapi-event-FOO.c need qapi-event.h to get enum QAPIEvent Perhaps we'll get rid of those some other day. Adding a type to qapi/migration.json now recompiles some 120 instead of 2300 out of 5100 objects. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-25-armbru@redhat.com> [eblake: rebase to master] Signed-off-by: Eric Blake <eblake@redhat.com>
2018-02-20ui: Reorder vte terminal packing to avoid gtk3 warningsJan Kiszka1-2/+2
Fill the terminal box from right to left to avoid Gtk-WARNING **: Allocating size to GtkScrollbar 0x55f6d54b0200 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Message-id: 902aaef8-d20e-0530-dea2-cdfe3db33ff3@web.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20gtk: add and use DisplayOptions + DisplayGTKGerd Hoffmann1-14/+18
Add QAPI DisplayType enum, DisplayOptions union and DisplayGTK struct. Switch gtk configuration to use the qapi type. Some bookkeeping (fullscreen for example) is done twice now, this is temporary until more/all UIs are switched over to qapi configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-5-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-09Include qapi/error.h exactly where neededMarkus Armbruster1-0/+1
This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e975 resolved, OSX breakage fixed]
2018-01-25ui: ignore hardware keycode 255 on win32Daniel P. Berrange1-0/+6
It is a reserved value and doesn't have a corresponding valid scancode. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20180117164717.15855-5-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-01-25ui: add fix for GTK Pause key handling on Win32Daniel P. Berrange1-1/+8
Versions of GTK prior to 3.22 did not correctly set the keyval field when VK_PAUSE was received on Windows. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20180117164717.15855-4-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-01-25ui: convert GTK and SDL1 frontends to keycodemapdbDaniel P. Berrange1-82/+123
The x_keycode_to_pc_keycode and evdev_keycode_to_pc_keycode tables are replaced with automatically generated tables. In addition the X11 heuristics are improved to detect running on XQuartz and XWin X11 servers, to activate the correct OS-X and Win32 keycode maps. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20180117164717.15855-3-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-01-12ui: deprecate use of GTK 2.x in favour of 3.x seriesDaniel P. Berrange1-0/+5
The GTK 3.0 release was made in Feb, 2011: https://blog.gtk.org/2011/02/10/gtk-3-0-released/ That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported. Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20171212113440.16483-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-10-16ui/gtk: Fix deprecation of vte_terminal_copy_clipboardAnthony PERARD1-0/+5
vte_terminal_copy_clipboard() is deprecated in VTE 0.50. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-06-02chardev: move headers to include/chardevMarc-André Lureau1-1/+1
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-05-11ui: Support non-zero minimum values for absolute input axesPhilippe Voinov1-2/+2
This patch refactors ui/input.c to support absolute axis minimum values other than 0. All dependent calls to qemu_input_queue_abs have been updated to explicitly supply 0 as the axis minimum value. Signed-off-by: Philippe Voinov <philippevoinov@gmail.com> Message-id: 20170505133952.29885-1-philippevoinov@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04char: remove qemu_chr_be_generic_openMarc-André Lureau1-1/+1
The function simply alias and hides the real event function. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-02-27ui: Use XkbGetMap and XkbGetNames instead of XkbGetKeyboardDaniel P. Berrange1-3/+4
XkbGetKeyboard does not work in XWayland and even on non-Wayland X11 servers its use is discouraged: https://bugs.freedesktop.org/show_bug.cgi?id=89240 This resolves a problem whereby QEMU prints "could not lookup keycode name" on startup when running under XWayland. Keymap handling is however still broken after this commit, since Xwayland is reporting a keymap we can't handle "unknown keycodes `(unnamed)', please report to qemu-devel@nongnu.org" NB, native Wayland support (which is the default under GTK3) is not affected - only XWayland (which can be requested with GDK_BACKEND on GTK3, and is the only option for GTK2). Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170227132343.30824-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-02-27gtk-egl: add scanout_disable supportGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1487669841-13668-7-git-send-email-kraxel@redhat.com
2017-02-27console: rename dpy_gl_scanout to dpy_gl_scanout_textureGerd Hoffmann1-2/+2
We'll add a variant which accepts dmabufs soon. Change the name so we can easily disturgish the two variants. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1487669841-13668-2-git-send-email-kraxel@redhat.com
2017-02-02Merge remote-tracking branch 'remotes/elmarco/tags/chr-split-pull-request' ↵Peter Maydell1-8/+1
into staging # gpg: Signature made Tue 31 Jan 2017 19:32:40 GMT # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/chr-split-pull-request: (41 commits) char: headers clean-up char: move parallel chardev in its own file char: move serial chardev to its own file char: move pty chardev in its own file char: move pipe chardev in its own file char: move console in its own file char: move stdio in its own file char: move file chardev in its own file char: move udp chardev in its own file char: move socket chardev to its own file char: move win-stdio into its own file char: move win chardev base class in its own file char: move fd chardev in its own file char: move QIOChannel-related stuff to char-io.h char: remove unused READ_RETRIES char: rename and move to header CHR_READ_BUF_LEN char: move ringbuf/memory to its own file char: move mux to its own file char: move null chardev to its own file char: make null_chr_write() the default method ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31gtk: Hardcode LC_CTYPE as C.utf-8Kevin Wolf1-1/+5
Commit 2cb5d2a4 removed setlocale() for everything except LC_MESSAGES in order to avoid unwanted side effects such as using the wrong decimal separator in generated JSON objects. However, the problem that unsetting LC_CTYPE caused is that non-ASCII characters are considered non-printable now and therefore the GTK menus display question marks for accented letters, Chinese characters etc. A first attempt to fix this [1] was rejected because even just setting LC_CTYPE to the user's locale (and thereby modifying the semantics of the ctype.h functions) could have unwanted effects that we're not aware of yet. Recently, however, glibc introduced a new locale "C.utf-8" that just uses UTF-8 as its charset, but otherwise leaves the semantics alone. Just setting the right character set is enough for our use case, so we can just hardcode this one without having to be afraid of nasty side effects. Older systems that don't have the new locale will continue displaying question marks, but this should fix the problem for most users. [1] https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03591.html ('Re: gtk: use setlocale() for LC_MESSAGES only') Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20170131100945.8189-1-kwolf@redhat.com [ kraxel: change C.utf-8 to C.UTF-8 ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-31char: remove class kind fieldMarc-André Lureau1-1/+0
The class kind is necessary to lookup the chardev name in qmp_chardev_add() after calling qemu_chr_new_from_opts() and to set the appropriate ChardevBackend (mainly to free the right fields). qemu_chr_new_from_opts() can be changed to use a non-qmp function using the chardev class typename. Introduce qemu_chardev_add() to be called from qemu_chr_new_from_opts() and remove the class chardev kind field. Set the backend->type in the parse callback (when non-common fields are added). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-01-31char: get rid of CharDriverMarc-André Lureau1-8/+2
qemu_chr_new_from_opts() is modified to not need CharDriver backend[] array, but uses instead objectified qmp_query_chardev_backends() and char_get_class(). The alias field is moved outside in a ChardevAlias[], similar to QDevAlias for devices. "kind" and "parse" are moved to ChardevClass ("kind" is to be removed next) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-01-31ui/gtk.c: add ctrl-alt-= support for zoom in accelerationZiyue Yang1-0/+9
Solving wishlist item at https://bugs.launchpad.net/qemu/+bug/1656710 by accepting Ctrl-Alt-= as an additional zoom-in acceleration. Using gtk_accel_group_connect to support multiple accelerations triggering a single menu item since that gtk_accel_map_add_entry seems to support only one acceleration. A wrapper function gd_accel_zoom_in is added to support gtk_accel_group_connect's callback activities. Signed-off-by: Ziyue Yang <skiver.cloud.yzy@gmail.com> Message-id: 1485826335-15686-1-git-send-email-skiver.cloud.yzy@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-31ui/gtk: Fix mouse wheel on 3.4.0 or laterOGAWA Hirofumi1-0/+13
On 3.4.0 or later, send GDK_SCROLL_SMOOTH event, instead of GDK_SCROLL_UP/DOWN. This fixes it by converting any smooth scroll to up/down. (I.e. without smooth support) Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-31ui: add support for mice with extra/side buttonsFabian Lesniak1-0/+4
Adds input event generation for BTN_SIDE and BTN_EXTRA events to gtk and input-linux methods. Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de> Message-id: 20161206190007.7539-4-fabian@lesniak-it.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-27chardev: qom-ifyMarc-André Lureau1-23/+28
Turn Chardev into Object. qemu_chr_alloc() is replaced by the qemu_chardev_new() constructor. It will call qemu_char_open() to open/intialize the chardev with the ChardevCommon *backend settings. The CharDriver::create() callback is turned into a ChardevClass::open() which is called from the newly introduced qemu_chardev_open(). "chardev-gdb" and "chardev-hci" are internal chardev and aren't creatable directly with -chardev. Use a new internal flag to disable them. We may want to use TYPE_USER_CREATABLE interface instead, or perhaps allow -chardev usage. Although in general we keep typename and macros private, unless the type is being used by some other file, in this patch, all types and common helper macros for qemu-char.c are in char.h. This is to help transition now (some types must be declared early, while some aren't shared) and when splitting in several units. This is to be improved later. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-27gtk: overwrite the console.c char driverMarc-André Lureau1-9/+21
Instead of registering a vc handler to allocate the Gtk VC Chardev, overwrite the console.c char driver. A later patch, when switching to QOM, will register a default console vc QOM class if none has been registered before. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-27char: rename CharDriverState ChardevMarc-André Lureau1-13/+13
Pick a uniform chardev type name. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-27char: allocate CharDriverState as a single objectMarc-André Lureau1-11/+19
Use a single allocation for CharDriverState, this avoids extra allocations & pointers, and is a step towards more object-oriented CharDriver. Gtk console is a bit peculiar, gd_vc_chr_set_echo() used to have a temporary VirtualConsole to save the echo bit. Instead now, we consider whether vcd->console is set or not, and restore the echo bit saved in VCDriverState when calling gd_vc_vte_init(). The casts added are temporary, they are replaced with QOM type-safe macros in a later patch in this series. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-27char: move callbacks in CharDriverMarc-André Lureau1-4/+7
This makes the code more declarative, and avoids duplicating the information on all instances. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-10gtk: avoid oob array accessMarc-André Lureau1-0/+5
When too many consoles are created, vcs[] may be write out-of-bounds. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20161207105511.25173-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-10ui: use evdev keymap when running under waylandDaniel P. Berrange1-0/+7
Wayland always uses evdev as its input source, so QEMU can use the existing evdev keymap data Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20161201094117.16407-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-10ui/gtk: fix crash at startup when no console is availableHervé Poussineau1-1/+5
This patch fixes a segfault at QEMU startup, introduced in a08156321ab9a7d2fed9ee77dbfeea2a61ffd153. gd_vc_find_current() return NULL, which is dereferenced without checking it. While at it, disable the whole 'View' menu if no console exists. Reproducer: qemu-system-i386 -M none -nodefaults Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1483263585-8101-1-git-send-email-hpoussin@reactos.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-12-14ui/gtk: fix "Copy" menu item segfaultStefan Hajnoczi1-0/+8
The "Copy" menu item copies VTE terminal text to the clipboard. This only works with VTE terminals, not with graphics consoles. Disable the menu item when the current notebook page isn't a VTE terminal. This patch fixes a segfault. Reproducer: Start QEMU and click the Copy menu item when the guest display is visible. Reported-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20161214142518.10504-1-stefanha@redhat.com Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-11-10ui/gtk: Fix build with older versions of gtkThomas Huth1-1/+2
GDK_KEY_Delete is only defined with gtk version 2.22 and newer, on older versions this key was called GDK_Delete instead. Since this is the case for all GDK_KEY_* defines, change the already existing preprocessor check there to test for version 2.22, so we know that we can remove this code block in case we require that version as a minimum one day. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1478081328-25515-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-10-28ui/gtk: Fix non-working DELETE keyThomas Huth1-1/+3
GTK generates key events for the delete key with key->string[0] = 0x7f ... but this does not work right with the readline_handle_byte() function in util/readline.c, since this treats the keycode 127 as backspace. So let's add a special case for the GTK delete key to make this key behave right in the monitor interface of the GTK ui. Buglink: https://bugs.launchpad.net/qemu/+bug/1619438 Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1477570647-7100-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-10-28gtk: fix compilation warning with gtk 3.22.2Alberto Garcia1-2/+21
gdk_screen_get_width() is deprecated since gtk 3.22.2, use gdk_monitor_get_geometry() instead if it's available. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: 20161026152108.12364-1-berto@igalia.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-10-24char: remove explicit_be_open from CharDriverStateMarc-André Lureau1-3/+0
It's only used in qmp_chardev_add(), so use a create() argument instead. Also switched to typedef functions for CharDriverParse/CharDriverCreate. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022100951.19562-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-10-24char: remove init callbackMarc-André Lureau1-3/+0
The CharDriverState.init() callback is no longer set since commit a61ae7f88ce and thus unused. The only user, the malta FGPA display has been converted to use an event "opened" callback instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022095318.17775-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-06-10gtk: fix vte version checkOlaf Hering1-1/+1
vte_terminal_set_encoding takes 3 args since 0.38.0. This fixes commit fba958c6 ("gtk: implement set_echo") Signed-off-by: Olaf Hering <olaf@aepfle.de> Message-id: 20160608214352.32669-1-olaf@aepfle.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-06-03gtk: fix unchecked vc dereferenceGerd Hoffmann1-1/+2
Spotted by Coverity. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1463737748-1062-1-git-send-email-kraxel@redhat.com
2016-05-13gtk: don't leak the GtkBorder with VTE 0.36Alberto Garcia1-10/+13
When gtk_widget_style_get() is used to get the "inner-border" style property, it returns a copy of the GtkBorder which must be freed by the caller. This patch also fixes a warning about the unused 'padding' structure with VTE 0.36. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: 1463127654-5171-1-git-send-email-berto@igalia.com Cc: Cole Robinson <crobinso@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> [ kraxel: adapted to changes in ui patch queue ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-05-12gtk: update grab code for gtk 3.20Gerd Hoffmann1-6/+43
Fixes the remaining gtk 3.20 warnings. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com> Tested-by: Cole Robinson <crobinso@redhat.com> Message-id: 1463038146-13939-1-git-send-email-kraxel@redhat.com
2016-05-12ui/gtk: copy to clipboard supportMichael S. Tsirkin1-0/+18
This adds a menu item to copy current selection to clipboard. Seems handy for copying out guest error messages. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1460924740-24513-1-git-send-email-mst@redhat.com [ kraxel: fix build with CONFIG_VTE=n ] [ kraxel: fix build with CONFIG_VTE=n, now for real ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-05-11ui: gtk: Fix some deprecation warningsCole Robinson1-7/+13
All device manager APIs are deprecated now. Much of our usage is just to get the current pointer, so centralize that logic and use the new seat APIs Signed-off-by: Cole Robinson <crobinso@redhat.com> Message-id: d6dec24220a4e1449a0172119c10c48e145c0f6f.1462557436.git.crobinso@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>