diff options
author | Peter Maydell | 2016-03-01 12:15:00 +0100 |
---|---|---|
committer | Peter Maydell | 2016-03-01 12:15:00 +0100 |
commit | 0b85d735831d69ff4ba776e7067ef2e285b234cf (patch) | |
tree | 4c6ab9473a345766c3e6fe3f8742426a80c5242f /ui/vnc.c | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20160301-1' into s... (diff) | |
parent | qapi: promote input-send-event to stable (diff) | |
download | qemu-0b85d735831d69ff4ba776e7067ef2e285b234cf.tar.gz qemu-0b85d735831d69ff4ba776e7067ef2e285b234cf.tar.xz qemu-0b85d735831d69ff4ba776e7067ef2e285b234cf.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20160301-1' into staging
qapi: fix input-send-event and promote to stable
# gpg: Signature made Tue 01 Mar 2016 08:19:52 GMT 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-input-20160301-1:
qapi: promote input-send-event to stable
qapi: rename InputAxis values.
qapi: rename input buttons
qapi: switch x-input-send-event from console to device+head
console: add & use qemu_console_lookup_by_device_name
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r-- | ui/vnc.c | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -1593,8 +1593,8 @@ static void pointer_event(VncState *vs, int button_mask, int x, int y) [INPUT_BUTTON_LEFT] = 0x01, [INPUT_BUTTON_MIDDLE] = 0x02, [INPUT_BUTTON_RIGHT] = 0x04, - [INPUT_BUTTON_WHEELUP] = 0x08, - [INPUT_BUTTON_WHEELDOWN] = 0x10, + [INPUT_BUTTON_WHEEL_UP] = 0x08, + [INPUT_BUTTON_WHEEL_DOWN] = 0x10, }; QemuConsole *con = vs->vd->dcl.con; int width = pixman_image_get_width(vs->vd->server); @@ -3732,19 +3732,12 @@ void vnc_display_open(const char *id, Error **errp) device_id = qemu_opt_get(opts, "display"); if (device_id) { - DeviceState *dev; int head = qemu_opt_get_number(opts, "head", 0); + Error *err = NULL; - dev = qdev_find_recursive(sysbus_get_default(), device_id); - if (dev == NULL) { - error_setg(errp, "Device '%s' not found", device_id); - goto fail; - } - - con = qemu_console_lookup_by_device(dev, head); - if (con == NULL) { - error_setg(errp, "Device %s is not bound to a QemuConsole", - device_id); + con = qemu_console_lookup_by_device_name(device_id, head, &err); + if (err) { + error_propagate(errp, err); goto fail; } } else { |