aboutsummaryrefslogtreecommitdiff
path: root/ui
AgeCommit message (Collapse)Author
2021-02-04ui: add gd_gl_area_scanout_disableMarc-André Lureau
Require the callback, drop the fallback path. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-8-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-02-04ui: remove gl_ctx_get_currentMarc-André Lureau
There are no users left. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-7-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-02-04ui: remove extra #ifdef CONFIG_OPENGLMarc-André Lureau
Since commit 5cb69566daa8081abb82a13403dcc0fffed02007 ("gtk: remove CONFIG_GTK_GL"), some #ifdef are redundants. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-6-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-02-04spice: delay starting until display are initializedMarc-André Lureau
QEMU used to run qemu_spice.display_init() before vm_start(), and QXL/display interfaces where started then. Now, vm_start() happens before QXL/display interfaces are added and Spice server doesn't automatically start them in this case (fixed in spice git) Fixes Spice regression introduced after 5.2, with refactoring commits b4e1a34211 ("vl: remove separate preconfig main_loop") and facf7c60ee ("vl: initialize displays _after_ exiting preconfiguration"), probably others. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210129152351.161971-1-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-29ui: update keycodemapdb submodule commitDaniel P. Berrangé
Primarily this is to pull in a fix for Win32 keycodes. The other useful change is the removal of build timestamp from generated files which is desirable for reproducable builds. The make rules need updating due to slightly changed CLI syntax - more args must now come after the command name. 6119e6e19a050df847418de7babe5166779955e4 Fix scan codes for Korean keys 685684a8404301780714e8a89a871981e7cae988 Fix argument order in output headers b3774853042c951b200d767697285781cc59a83c Add HTML entries for Korean layout keys 8e54850d800e4697a2798fb82ac740e760f8530b Add macOS entries for Japanese keyboards 27acf0ef828bf719b2053ba398b195829413dbdd Fix win32 keycode for VK_OEM_102 317d3eeb963a515e15a63fa356d8ebcda7041a51 Add support for generating RST formatted docs pages 7381b9bfadd31c4c9e9a10b5bb5032f9189d4352 Introduce separate args for title & subtitle with docs generator 6280c94f306df6a20bbc100ba15a5a81af0366e6 keymap-gen: Name sections in pod output df4e56f8fab65ba714ec18f4e7338a966a1620ad Add an empty meson project 16e5b0787687d8904dad2c026107409eb9bfcb95 remove buildtime from generated files 044f21dd0d4f62519aae9f1d53a026407a0b664f add header file generators 7779876a6b06755e3bb2c94ee3ded50635bcb0fa c++: add extern declaration to the generated file 0e0a317889464397d6f1ae03aad0d2ca593aab04 move CLanguageGenerator closer to CLanguageGenerator itself Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-28Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-01-28' into ↵Peter Maydell
staging QAPI patches patches for 2021-01-28 # gpg: Signature made Thu 28 Jan 2021 07:10:21 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2021-01-28: qapi: More complex uses of QAPI_LIST_APPEND qapi: Use QAPI_LIST_APPEND in trivial cases qapi: Introduce QAPI_LIST_APPEND qapi: A couple more QAPI_LIST_PREPEND() stragglers net: Clarify early exit condition Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-01-28qapi: More complex uses of QAPI_LIST_APPENDEric Blake
These cases require a bit more thought to review; in each case, the code was appending to a list, but not with a FOOList **tail variable. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210113221013.390592-6-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Flawed change to qmp_guest_network_get_interfaces() dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-01-27vnc: send extended desktop resize on update requestsGerd Hoffmann
Unlike other pseudo-encodings these don't break gtk-vnc because older versions don't suport the extended desktop resize extension in the first place. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210125104041.495274-3-kraxel@redhat.com>
2021-01-27Revert "vnc: move initialization to framebuffer_update_request"Gerd Hoffmann
This reverts commit 9e1632ad07ca49de99da4bb231e9e2f22f2d8df5. Older gtk-vnc versions can't deal with non-incremental update requests sending pseudo-encodings, so trying to send full server state (including desktop size, cursor etc. which is done using pseudo-encodings) doesn't fly. Return to old behavior to send those only for new connects and when changes happen. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210125104041.495274-2-kraxel@redhat.com>
2021-01-23vnc: support "-vnc help"Paolo Bonzini
Use qemu_opts_parse_noisily now that HMP does not call vnc_parse anymore. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20210120144235.345983-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-15vnc: add support for extended desktop resizeGerd Hoffmann
The extended desktop resize encoding adds support for (a) clients sending resize requests to the server, and (b) multihead support. This patch implements (a). All resize requests are rejected by qemu. Qemu can't resize the framebuffer on its own, this is in the hands of the guest, so all qemu can do is forward the request to the guest. Should the guest actually resize the framebuffer we can notify the vnc client later with a separate message. This requires support in the display device. Works with virtio-gpu. https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#extendeddesktopsize-pseudo-encoding Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20210112134120.2031837-4-kraxel@redhat.com
2021-01-15vnc: move initialization to framebuffer_update_requestGerd Hoffmann
qemu sends various state info like current cursor shape to newly connected clients in response to a set_encoding message. This is not correct according to the rfb spec. Send that information in response to a full (incremental=0) framebuffer update request instead. Also send the resize information unconditionally, not only in case of an actual server-side change. This makes the qemu vnc server conform to the spec and allows clients to request the complete vnc server state without reconnect. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20210112134120.2031837-3-kraxel@redhat.com
2021-01-15vnc: move check into vnc_cursor_defineGerd Hoffmann
Move the check whenever a cursor exists into the vnc_cursor_define() function so callers don't have to do it. Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20210112134120.2031837-2-kraxel@redhat.com
2021-01-15vnc: Fix a memleak in vnc_display_connect()Alex Chen
Free the 'sioc' when the qio_channel_socket_connect_sync() fails. Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20201126065702.35095-1-alex.chen@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15ui: add support for remote power control to VNC serverDaniel P. Berrangé
The "XVP" (Xen VNC Proxy) extension defines a mechanism for a VNC client to issue power control requests to trigger graceful shutdown, reboot, or hard reset. This option is not enabled by default, since we cannot assume that users with VNC access implicitly have administrator access to the guest OS. Thus is it enabled with a boolean "power-control" option e.g. -vnc :1,power-control=on While, QEMU can easily support shutdown and reset, there's no easy way to wire up reboot support at this time. In theory it could be done by issuing a shutdown, followed by a reset, but there's no convenient wiring for such a pairing in QEMU. It also isn't possible to have the VNC server directly talk to QEMU guest agent, since the agent chardev is typically owned by an external mgmt app. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> [ kraxel: rebase to master ] [ kraxel: add missing break ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15vnc: fix unfinalized tlscreds for VncDisplayZihao Chang
In vnc_display_open(), if tls-creds is enabled, do object_ref(object ref 1->2) for tls-creds. While in vnc_display_close(), object_unparent sets object ref to 1(2->1) and unparent the object for root. Problem: 1. the object can not be found from the objects_root, while the object is not finalized. 2. the qemu_opts of tls-creds(id: creds0) is not deleted, so new tls object with the same id(creds0) can not be delete & add. Signed-off-by: Zihao Chang <changzihao1@huawei.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210111131911.805-1-changzihao1@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15ui/gtk: update monitor interval on egl displaysNikola Pavlica
When running QEMU's GTK UI without EGL or OGL, the gd_monitor_update_interval function gets executed and the display refresh rate gets updated accordingly. However, when using EGL or just regular OGL, the function never gets executed. Which is why I decided that the function should be in gd_egl_refresh where the display output gets updated, in the same vain as how it's done for normal GTK UIs (aka. those without EGL) - in it's display refresh function. Since the gd_monitor_update_interval function now is exposed, we are going to use it to update the refresh rate. Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com> Message-Id: <20210114140153.301473-3-pavlica.nikola@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15ui/gtk: expose gd_monitor_update_intervalNikola Pavlica
The gd_egl_refresh function, as the name suggests, is responsible for refreshing displays when using EGL graphics with QEMU's GTK UI. This is a perfect candidate for a function to update the refresh rate in. Since gd_monitor_update_interval is inaccessible from the gd_egl_refresh function, we need to expose/globalize it in the include/ui/gtk.h file. Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com> Message-Id: <20210114140153.301473-2-pavlica.nikola@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15ui/gtk: limit virtual console max update intervalVolker Rümelin
Limit the virtual console maximum update interval to GUI_REFRESH_INTERVAL_DEFAULT. This papers over a integer overflow bug in gtk3 on Windows where the reported monitor refresh frequency can be much smaller than the real refresh frequency. The gtk bug report can be found here: https://gitlab.gnome.org/GNOME/gtk/-/issues/3394 On my Windows 10 system gtk reports a monitor refresh rate of 1.511Hz instead of 60.031Hz and slows down the screen update rate in qemu to a crawl. Provided you are affected by the gtk bug on Windows, these are the steps to reproduce the issue: Start qemu with -display gtk and activate all qemu virtual consoles and notice the reduced qemu refresh rate. Activating all virtual consoles is necessary, because gui_update() in ui/console.c uses the minimum of all display change listeners update interval and not yet activated virtual consoles report the default update interval (30ms). Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20201213165724.13418-3-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15ui/gtk: rename variable window to widgetVolker Rümelin
The type of the variable window is GtkWidget. Rename the variable from window to widget, because windows and widgets are different things. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20201213165724.13418-2-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-15ui/gtk: don't try to redefine SI prefixesVolker Rümelin
Redefining SI prefixes is always wrong. 1s has per definition 1000ms. Remove the misnamed named constant and replace it with a comment explaining the frequency to period conversion in two simple steps. Now you can cancel out the unit mHz in the comment with the implicit unit mHz in refresh_rate_millihz and see why the implicit unit ms for update_interval remains. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20201213165724.13418-1-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-01-12Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ↵Peter Maydell
staging * UI configury cleanups and Meson conversion * scripts/gdb improvements * WHPX cleanups and fixes * cirrus win32 CI improvements * meson gnutls workaround # gpg: Signature made Tue 12 Jan 2021 16:05:19 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: target/i386: Use X86Seg enum for segment registers configure: quote command line arguments in config.status configure: move Cocoa incompatibility checks to Meson configure: move GTK+ detection to Meson configure: move X11 detection to Meson gtk: remove CONFIG_GTK_GL cocoa: do not enable coreaudio automatically virtio-scsi: trace events meson: Propagate gnutls dependency Docs/RCU: Correct sample code of qatomic_rcu_set scripts/gdb: implement 'qemu bt' scripts/gdb: fix 'qemu coroutine' when users selects a non topmost stack frame meson: fix Cocoa option in summary whpx: move whpx_lapic_state from header to c file maintainers: Add me as Windows Hosted Continuous Integration maintainer cirrus/msys2: Cache msys2 mingw in a better way. cirrus/msys2: Exit powershell with $LastExitCode whpx: move internal definitions to whpx-internal.h whpx: rename whp-dispatch to whpx-internal.h meson: do not use CONFIG_VIRTFS Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-01-12ui/cocoa: Fix openFile: deprecation on Big SurRoman Bolshakov
ui/cocoa.m:1188:44: warning: 'openFile:' is deprecated: first deprecated in macOS 11.0 - Use -[NSWorkspace openURL:] instead. [-Wdeprecated-declarations] if ([[NSWorkspace sharedWorkspace] openFile: full_file_path] == YES) { ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWorkspace.h:350:1: note: 'openFile:' has been explicitly marked deprecated here - (BOOL)openFile:(NSString *)fullPath API_DEPRECATED("Use -[NSWorkspace openURL:] instead.", macos(10.0, 11.0)); ^ Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20210102150718.47618-1-r.bolshakov@yadro.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-01-12configure: move GTK+ detection to MesonPaolo Bonzini
This also allows removing CONFIG_NEED_X11, all the ingredients can be computed easily in meson.build. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-12configure: move X11 detection to MesonPaolo Bonzini
For now move the logic verbatim. GTK+ actually has a hard requirement on X11 if gtk+x11 is present, but we will sort that out later. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-12gtk: remove CONFIG_GTK_GLPaolo Bonzini
CONFIG_GTK_GL is defined if OpenGL is present and GTK+ is 3.16 or newer. Since GTK+ 3.22 is the minimum supported version, just use CONFIG_OPENGL instead. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-12meson: Propagate gnutls dependencyRoman Bolshakov
crypto/tlscreds.h includes GnuTLS headers if CONFIG_GNUTLS is set, but GNUTLS_CFLAGS, that describe include path, are not propagated transitively to all users of crypto and build fails if GnuTLS headers reside in non-standard directory (which is a case for homebrew on Apple Silicon). Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20210102125213.41279-1-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-12ui/cocoa: Update path to docs in build treeRoman Bolshakov
QEMU documentation can't be opened if QEMU is run from build tree because executables are placed in the top of build tree after conversion to meson. Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Reported-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20210108213815.64678-1-r.bolshakov@yadro.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-01-08Remove superfluous timer_del() callsPeter Maydell
This commit is the result of running the timer-del-timer-free.cocci script on the whole source tree. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20201215154107.3255-4-peter.maydell@linaro.org
2020-12-19qapi: Use QAPI_LIST_PREPEND() where possibleEric Blake
Anywhere we create a list of just one item or by prepending items (typically because order doesn't matter), we can use QAPI_LIST_PREPEND(). But places where we must keep the list in order by appending remain open-coded until later patches. Note that as a side effect, this also performs a cleanup of two minor issues in qga/commands-posix.c: the old code was performing new = g_malloc0(sizeof(*ret)); which 1) is confusing because you have to verify whether 'new' and 'ret' are variables with the same type, and 2) would conflict with C++ compilation (not an actual problem for this file, but makes copy-and-paste harder). Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20201113011340.463563-5-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [Straightforward conflicts due to commit a8aa94b5f8 "qga: update schema for guest-get-disks 'dependents' field" and commit a10b453a52 "target/mips: Move mips_cpu_add_definition() from helper.c to cpu.c" resolved. Commit message tweaked.] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-12-15qmp: generalize watchdog-set-action to -no-reboot/-no-shutdownAlejandro Jimenez
Add a QMP command to allow for the behaviors specified by the -no-reboot and -no-shutdown command line option to be set at runtime. The new command is named set-action and takes optional arguments, named after an event, that provide a corresponding action to take. Example: -> { "execute": "set-action", "arguments": { "reboot": "none", "shutdown": "poweroff", "watchdog": "debug" } } <- { "return": {} } Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com> Message-Id: <1607705564-26264-4-git-send-email-alejandro.j.jimenez@oracle.com> [Split the series differently, with -action based on the QMP command. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-15machine: introduce MachineInitPhasePaolo Bonzini
Generalize the qdev_hotplug variable to the different phases of machine initialization. We would like to allow different monitor commands depending on the phase. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-11Merge remote-tracking branch 'remotes/kraxel/tags/ui-20201211-pull-request' ↵Peter Maydell
into staging ui/console ui_info tweaks. ui/vnc: alpha cursor support. ui/vnc: locking fixes. ui/sdl: add extra mouse buttons. # gpg: Signature made Fri 11 Dec 2020 09:12:39 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20201211-pull-request: sdl2: Add extra mouse buttons ui/vnc: Add missing lock for send_color_map vnc: add alpha cursor support vnc: add pseudo encodings vnc: drop unused copyrect feature vnc: use enum for features console: allow con==NULL in dpy_{get, set}_ui_info and dpy_ui_info_supported console: drop qemu_console_get_ui_info Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-12-11sdl2: Add extra mouse buttonsDarrell Walisser
Allows guest to receive mouse buttons 4 and 5, aka "SIDE" button and "EXTRA" button Signed-off-by: Darrell Walisser <darrell.walisser@gmail.com> Message-id: GNUALCfDBqhCUvLwBNJaKqxcPewMtlqCnixk8xTrgI@ubuntu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-12-11ui/vnc: Add missing lock for send_color_mapPeng Liang
vnc_write() should be locked after the RFB protocol is initialized. Fixes: 0c426e4534b4 ("vnc: Add support for color map") Cc: qemu-stable@nongnu.org Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Peng Liang <liangpeng10@huawei.com> Message-id: 20201116141338.148911-1-liangpeng10@huawei.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-12-11vnc: add alpha cursor supportGerd Hoffmann
There is a new vnc extension for cursors with an alpha channel. Use it if supported by the vnc client, prefer it over the "rich cursor" extension which supports only a bitmask for transparency. This is a visible improvement especially on modern desktops which actually use the alpha channel when defining cursors. https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#cursor-with-alpha-pseudo-encoding Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20201208115737.18581-7-kraxel@redhat.com
2020-12-11vnc: add pseudo encodingsGerd Hoffmann
Add #defines for two new pseudo encodings: * cursor with alpha channel. * extended desktop resize. https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#pseudo-encodings Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20201208115737.18581-6-kraxel@redhat.com
2020-12-11vnc: drop unused copyrect featureGerd Hoffmann
vnc stopped using the copyrect pseudo encoding in 2017, in commit 50628d3479e4 ("cirrus/vnc: zap bitblit support from console code.") So we can drop the now unused copyrect feature bit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20201208115737.18581-5-kraxel@redhat.com
2020-12-11vnc: use enum for featuresGerd Hoffmann
Use an enum for the vnc feature bits. That way they are enumerated automatically and we don't have to do that manually when adding or removing features. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201208115737.18581-4-kraxel@redhat.com
2020-12-11console: allow con==NULL in dpy_{get, set}_ui_info and dpy_ui_info_supportedGerd Hoffmann
Use active_console in that case like we do in many other places. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20201208115737.18581-3-kraxel@redhat.com
2020-12-11console: drop qemu_console_get_ui_infoGerd Hoffmann
Unused and duplicate (there is dpy_get_ui_info). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20201208115737.18581-2-kraxel@redhat.com
2020-12-10vl: extract softmmu/datadir.cPaolo Bonzini
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-11-25qxl: fix segfaultGerd Hoffmann
Add missing sanity check. Reproducer: run qemu with "-device qxl" but without "-spice ..." Fixes: 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201124122936.30588-1-kraxel@redhat.com
2020-11-15nomaintainer: Fix Lesser GPL version numberChetan Pant
There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. This patch contains all the files, whose maintainer I could not get from ‘get_maintainer.pl’ script. Signed-off-by: Chetan Pant <chetan4windows@gmail.com> Message-Id: <20201023124424.20177-1-chetan4windows@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Adapted exec.c and qdev-monitor.c to new location] Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-11-13console: avoid passing con=NULL to graphic_hw_update_done()lichun
In graphic_hw_update(), first select an existing console, a specific-console or active_console(if not specified), then updating the console. Signed-off-by: lichun <lichun@ruijie.com.cn> Message-id: 1604682219-114389-1-git-send-email-lichun@ruijie.com.cn Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-11-04Merge remote-tracking branch ↵Peter Maydell
'remotes/kraxel/tags/fixes-20201104-pull-request' into staging misc bugfixes for 5.2 # gpg: Signature made Wed 04 Nov 2020 15:46:33 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/fixes-20201104-pull-request: roms/Makefile: Add qboot to .PHONY list ati: check x y display parameter values vnc: fix resource leak when websocket channel error Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-11-04vnc: fix resource leak when websocket channel errorDing Hui
When we connect to vnc by websocket channel, and disconnect (maybe by some network exception) before handshake, qemu will left CLOSE_WAIT socket and never close it After 04d2529da2 ("ui: convert VNC server to use QIOChannelSocket") and dd154c4d9f ("io: fix handling of EOF / error conditions in websock GSource"), the vnc call qio_channel_add_watch only care about G_IO_IN, but mising G_IO_HUP and G_IO_ERR. When the websocket channel get EOF or error, it cannot callback, because the caller ignore the event, that leads to resource leak We need handle G_IO_HUP and G_IO_ERR event, then cleanup the channel Fixes: 04d2529da2 ("ui: convert VNC server to use QIOChannelSocket") Fixes: dd154c4d9f ("io: fix handling of EOF / error conditions in websock GSource") Cc: qemu-stable@nongnu.org Signed-off-by: Ding Hui <dinghui@sangfor.com.cn> Message-id: 20201029032241.11040-1-dinghui@sangfor.com.cn Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-11-04console: make QMP/HMP screendump run in coroutineMarc-André Lureau
Thanks to the monitors' coroutine support (merge commit b7092cda1b3), the screendump handler can trigger a graphic_hw_update(), yield and let the main loop run until update is done. Then the handler is resumed, and ppm_save() will write the screen image to disk in the coroutine context. The IO is still blocking though, as the file is set blocking so far, this could be addressed by some future change (with other caveats). Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1230527 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20201027133602.3038018-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-11-04console: modify ppm_save to take a pixman image refMarc-André Lureau
The function is going to be called from a coroutine, and may yield. Let's ensure our image reference doesn't change over time (due to resize etc) by keeping a ref. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20201027133602.3038018-3-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-10-26configure: move directory options from config-host.mak to mesonPaolo Bonzini
Since installation is not part of Makefiles anymore, Make need not know the directories anymore. Meson already knows them through built-in options, do everything using them instead of the config_host dictionary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>