From c0c3d4c8c9d2139284c7b351c22a03f628c20edc Mon Sep 17 00:00:00 2001 From: Dmitry Guryanov Date: Tue, 7 Apr 2015 23:35:10 +0300 Subject: [PATCH] parallels: add implicit input devices Add implicit input devices in parallelsLoadDomains, when VNC is enabled. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_sdk.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index b18b610171..d1998987fe 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -1312,6 +1312,21 @@ prlsdkLoadDomain(parallelsConnPtr privconn, if (virDomainDefAddImplicitControllers(def) < 0) goto error; + if (def->ngraphics > 0) { + int bus = IS_CT(def) ? VIR_DOMAIN_INPUT_BUS_PARALLELS: + VIR_DOMAIN_INPUT_BUS_PS2; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_MOUSE, + bus) < 0) + goto error; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_KBD, + bus) < 0) + goto error; + } + if (olddom) { /* assign new virDomainDef without any checks */ /* we can't use virDomainObjAssignDef, because it checks