summaryrefslogtreecommitdiff
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2013-02-11error: Strip trailing '\n' from error string arguments (again)Markus Armbruster2-2/+2
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming back. Tracked down with this Coccinelle semantic patch: @r@ expression err, eno, cls, fmt; position p; @@ ( error_report(fmt, ...)@p | error_set(err, cls, fmt, ...)@p | error_set_errno(err, eno, cls, fmt, ...)@p | error_setg(err, fmt, ...)@p | error_setg_errno(err, eno, fmt, ...)@p ) @script:python@ fmt << r.fmt; p << r.p; @@ if "\\n" in str(fmt): print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt) Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1360354939-10994-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-06vnc: recognize Hungarian doubleacutesMichael Tokarev1-0/+4
As reported in http://bugs.debian.org/697641 , some Hungarian keys does not work with qemu when using vnc display. This is because while the Hungarian keymap mentions these symbols, qemu know nothing about them. So add them. This patch is applicable to -stable for all previous releases. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-31cocoa: Replace non-portable asprintf() by g_strdup_printf()Stefan Weil1-3/+3
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-01-31cocoa: Fix VBE function Set Display StartHenry Harrington1-0/+21
Register a dpy_gfx_setdata callback so that the Cocoa code is notified whenever the screen start address changes. Commit 1d3323d has a similar fix for the VNC UI. Signed-off-by: Henry Harrington <henry.harrington@gmail.com> Cc: qemu-stable@nongnu.org (1.3.x) Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-01-30qemu-pixman.h: Avoid mutual inclusion loop with console.hPeter Maydell1-1/+2
Remove an unnecessary mutual inclusion loop between qemu-pixman.h and console.h, since the former was only including the latter for 'PixelFormat*', which can be provided by typedefs.h. This requires a minor adjustment to the files which included qemu-pixman.h, since they were relying on it implicitly dragging in all of console.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30spice: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster1-2/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30vnc: Clean up vncws_send_handshake_response()Markus Armbruster1-5/+6
Use appropriate types, drop superfluous casts, use sizeof, don't exploit that this particular call of gnutls_fingerprint() doesn't change its last argument. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-21vnc: fix possible uninitialized removalsTim Hardeck2-3/+9
Some VncState values are not initialized before the Websocket handshake. If it fails QEMU segfaults during the cleanup. To prevent this behavior intialization checks are added. Signed-off-by: Tim Hardeck <thardeck@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-21vnc: added initial websocket protocol supportTim Hardeck5-18/+559
This patch adds basic Websocket Protocol version 13 - RFC 6455 - support to QEMU VNC. Binary encoding support on the client side is mandatory. Because of the GnuTLS requirement the Websockets implementation is optional (--enable-vnc-ws). To activate Websocket support the VNC option "websocket"is used, for example "-vnc :0,websocket". The listen port for Websocket connections is (5700 + display) so if QEMU VNC is started with :0 the Websocket port would be 5700. As an alternative the Websocket port could be manually specified by using ",websocket=<port>" instead. Parts of the implementation base on Anthony Liguori's QEMU Websocket patch from 2010 and on Joel Martin's LibVNC Websocket implementation. Signed-off-by: Tim Hardeck <thardeck@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-21vnc: added buffer_advance functionTim Hardeck2-4/+10
Following Anthony Liguori's Websocket implementation I have added the buffer_advance function to VNC and replaced all related buffer memmove operations with it. Signed-off-by: Tim Hardeck <thardeck@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-16ui: Drop useless null tests in parse_keyboard_layout()Markus Armbruster1-7/+9
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-15sdl: Fix heap smash in sdl_zoom_rgb{16,32} for int > 32 bitsMarkus Armbruster2-15/+10
Careless use of malloc(): allocate Uint32[N], assign to int *, use int[N]. Fix by converting to g_new(). Functions can't fail anymore, so make them return void. Caller ignored the value anyway. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-12qemu-option: move standard option definitions out of qemu-config.cPaolo Bonzini1-0/+84
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-04spice: drop incorrect vm_change_state_handler() opaqueStefan Hajnoczi1-3/+2
The spice_server pointer is a global variable and vm_change_state_handler() therefore does not use its opaque parameter. The vm change state handler is added with a pointer to the spice_server pointer. This is useless and we probably would not want 2 levels of pointers. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Uri Lublin <uril@redhat.com>
2012-12-22build: fix includes for VNCPaolo Bonzini1-1/+0
vnc-tls.h is included by vnc.h, and it includes gnutls/gnutls.h. Hence, GnuTLS header files are needed by all files that include vnc.h, most notably qmp.c. Move these flags to QEMU_CFLAGS for simplicity. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-19Merge remote-tracking branch 'bonzini/header-dirs' into stagingAnthony Liguori29-269/+7305
* bonzini/header-dirs: (45 commits) janitor: move remaining public headers to include/ hw: move executable format header files to hw/ fpu: move public header file to include/fpu softmmu: move remaining include files to include/ subdirectories softmmu: move include files to include/sysemu/ misc: move include files to include/qemu/ qom: move include files to include/qom/ migration: move include files to include/migration/ monitor: move include files to include/monitor/ exec: move include files to include/exec/ block: move include files to include/block/ qapi: move include files to include/qobject/ janitor: add guards to headers qapi: make struct Visitor opaque qapi: remove qapi/qapi-types-core.h qapi: move inclusions of qemu-common.h from headers to .c files ui: move files to ui/ and include/ui/ qemu-ga: move qemu-ga files to qga/ net: reorganize headers net: move net.c to net/ ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19softmmu: move remaining include files to include/ subdirectoriesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini8-8/+8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini12-22/+22
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19migration: move include files to include/migration/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19monitor: move include files to include/monitor/Paolo Bonzini4-4/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qapi: move include files to include/qobject/Paolo Bonzini5-8/+8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: add guards to headersPaolo Bonzini2-0/+9
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19ui: move files to ui/ and include/ui/Paolo Bonzini18-225/+7252
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19janitor: do not include qemu-char everywherePaolo Bonzini1-1/+0
Touching char/char.h basically causes the whole of QEMU to be rebuilt. Avoid this, it is usually unnecessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19build: move rules from Makefile to */Makefile.objsPaolo Bonzini1-0/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-17spice-qemu-char: register spicevmc ports during qemu_spice_init()Marc-André Lureau2-0/+5
Do the delayed registration of spicevmc ports after Spice server is initialized. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-17spice-qemu-char: add spiceport chardevMarc-André Lureau1-0/+3
Add a new spice chardev to allow arbitrary communication between the host and the Spice client via the spice server. Examples: This allows the Spice client to have a special port for the qemu monitor: ... -chardev spiceport,name=org.qemu.monitor,id=monitorport -mon chardev=monitorport v2: - remove support for chardev to chardev linking - conditionnaly compile with SPICE_SERVER_VERSION Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-17qxl+vnc: register a vm state change handler for dummy spice_serverUri Lublin1-0/+2
When qxl + vnc are used, a dummy spice_server is initialized. The spice_server has to be told when the VM runstate changes, which is what this patch does. Without it, from qxl_send_events(), the following error message is shown: qxl_send_events: spice-server bug: guest stopped, ignoring Cc: qemu-stable@nongnu.org Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-14pixman: fix vnc tight png/jpeg supportGerd Hoffmann2-3/+3
This patch adds an x argument to qemu_pixman_linebuf_fill so it can also be used to convert a partial scanline. Then fix tight + png/jpeg encoding by passing in the x+y offset, so the data is read from the correct screen location instead of the upper left corner. Cc: 1087974@bugs.launchpad.net Cc: qemu-stable@nongnu.org Reported-by: Tim Hardeneck <thardeck@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-10Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori1-0/+2
* afaerber/qom-cpu: target-i386: Postpone cpuid_level update to realize time target-i386: Use define for cpuid vendor string size target-i386: Separate feature string parsing from CPU model lookup target-i386/cpu.c: Coding style fixes qdev: qdev_create(): use error_report() instead of hw_error() sysemu.h: Include qemu-types.h instead of qemu-common.h Create qemu-types.h for struct typedefs qlist.h: Do not include qemu-common.h qga/channel-posix.c: Include headers it needs qapi/qmp-registry.c: Include headers it needs ui/vnc-palette.c: Include headers it needs user: Rename qemu-types.h to qemu-user-types.h user: Move *-user/qemu-types.h to main directory Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-08curses: Remove OpenBSD workaroundBrad Smith1-4/+0
I removed the same sort of workaround for OpenBSD within the configure script with commit 4dcc3f5876fa638d5c35bd47be3b717ea74cc2e7 but didn't bother to grep further to come across this same chunk of code in the curses code itself. So the following diff removes the same workaround chunk within the curses code. Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-06ui/vnc-palette.c: Include headers it needsEduardo Habkost1-0/+2
Include: - <glib.h> for g_malloc0() - <string.h> for memset() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-26Merge remote-tracking branch 'spice/spice.v64' into stagingAnthony Liguori2-1/+36
* spice/spice.v64: spice: add new spice-server callbacks to ui/spice-display.c Fix the inconsistency in x509-dh-key-file parameter Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26vnc: fix option misspelling ("non-adapative" -> "non-adaptive")Catalin Patulea1-1/+1
Signed-off-by: Catalin Patulea <catalinp@google.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-21spice: add new spice-server callbacks to ui/spice-display.cGerd Hoffmann1-0/+35
Otherwise qemu crashes with non-qxl graphics cards. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-21Fix the inconsistency in x509-dh-key-file parameterLei Li1-1/+1
Commit c448e8552b0f6135dabddf944a7110f929c08320 (spice: tls support) added options to the -spice command line. But there is an inconsistency between the declaration of the option 'x509-dh-key-file' to -spice command line and its parameter parsing 'x509-dh-file' in function qemu_spice_init. https://bugs.launchpad.net/qemu/+bug/1035042 Reported-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-15vnc-palette.h: Include <stdbool.h>Eduardo Habkost1-0/+1
<stdbool.h> is needed for the 'bool' type, used in the header. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-05spice: fix initialization orderGerd Hoffmann1-1/+1
Register displaychangelistener last, after spice is fully initialized, otherwise we may hit NULL pointer dereferences when qemu starts calling our callbacks. Commit e250d949feb1334828f27f0d145c35f29c4b7639 triggers this bug. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-05spice: switch to pixmanGerd Hoffmann2-33/+25
Switch over spice-display.c to use the pixman library instead of the home-grown pflib bits. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-03Merge branch 'trivial-patches' of git://github.com/stefanha/qemuBlue Swirl4-18/+12
* 'trivial-patches' of git://github.com/stefanha/qemu: pc: Drop redundant test for ROM memory region exec: make some functions static target-ppc: make some functions static ppc: add missing static vnc: add missing static vl.c: add missing static target-sparc: make do_unaligned_access static m68k: Return semihosting errno values correctly cadence_uart: More debug information Conflicts: target-m68k/m68k-semi.c
2012-11-02ui/cocoa.m: Update to new DisplayChangeListener member namesPeter Maydell1-2/+2
Commit a93a4a2 changed the names of some fields in DisplayChangeListener and broke compilation of the cocoa UI. Update to the new names. Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-01vnc: add missing staticBlue Swirl4-18/+12
Add missing 'static' qualifiers. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-11-01pixman/vnc: remove dead code.Gerd Hoffmann3-87/+27
Switching the vnc server framebuffer to use 32bpp unconditionally turns the code bits which handle 8 and 16 bpp into dead code. Remove them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01pixman/vnc: remove rgb_prepare_row* functionsGerd Hoffmann1-74/+10
Let pixman do it instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01pixman/vnc: use pixman images in vnc.Gerd Hoffmann7-228/+259
The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content. The vnc code uses this to figure which parts of the guest screen did _really_ change to reduce the amount of updates sent to the vnc clients. It is also used as data source when sending out the updates to the clients. This surface gets replaced by a pixman image. The format changes too, instead of using the guest screen format we'll use fixed 32bit rgb framebuffer and convert the pixels on the fly when comparing and updating the server framebuffer. Third surface carries the format expected by the vnc client. That isn't used to store image data. This surface is switched to PixelFormat and a boolean for bigendian byte order. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: remove DisplayAllocatorGerd Hoffmann1-111/+6
Causes [temporary] preformance regression with 24bpp vga modes @ sdl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: remove dpy_gfx_fillGerd Hoffmann1-7/+0
Unused code. 'nuff said. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: untangle gfx & txt updatesGerd Hoffmann4-26/+19
Stop abusing displaysurface fields for text mode displays. (bpp = 0, width = cols, height = lines). Add flags to displaystate indicating whenever text mode display (curses) or gfx mode displays (sdl, vnc, ...) are present. Add separate displaychangelistener callbacks for text / gfx mode resize & updates. This allows to enable gfx and txt diplays at the same time and also paves the way for more cleanups in the future. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: move set_mouse + cursor_define callbacksGerd Hoffmann3-10/+10
When adding DisplayChangeListeners the set_mouse and cursor_define callbacks have been left in DisplayState for some reason. Fix it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>