diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -485,6 +485,15 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) case QEVENT_BLOCK_JOB_CANCELLED: event_name = "BLOCK_JOB_CANCELLED"; break; + case QEVENT_DEVICE_TRAY_MOVED: + event_name = "DEVICE_TRAY_MOVED"; + break; + case QEVENT_SUSPEND: + event_name = "SUSPEND"; + break; + case QEVENT_WAKEUP: + event_name = "WAKEUP"; + break; default: abort(); break; @@ -823,13 +832,18 @@ static int add_graphics_client(Monitor *mon, const QDict *qdict, QObject **ret_d CharDriverState *s; if (strcmp(protocol, "spice") == 0) { + int fd = monitor_get_fd(mon, fdname); + int skipauth = qdict_get_try_bool(qdict, "skipauth", 0); + int tls = qdict_get_try_bool(qdict, "tls", 0); if (!using_spice) { /* correct one? spice isn't a device ,,, */ qerror_report(QERR_DEVICE_NOT_ACTIVE, "spice"); return -1; } - qerror_report(QERR_ADD_CLIENT_FAILED); - return -1; + if (qemu_spice_display_add_client(fd, skipauth, tls) < 0) { + close(fd); + } + return 0; #ifdef CONFIG_VNC } else if (strcmp(protocol, "vnc") == 0) { int fd = monitor_get_fd(mon, fdname); |