Skip to content

Commit

Permalink
xenfb: activate input handlers for raw pointer devices
Browse files Browse the repository at this point in the history
If the frontend requests raw pointers, the input handlers must be
activated to have the input events delivered to the xenfb backend.
Without activation, the input events are delivered to handlers
registered earlier, which would be the emulated USB tablet or
emulated PS/2 mouse.
HVM xen_kbdfront can incorrectly scale absolute coordinates when
the display resolution is not 800x600.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
  • Loading branch information
OwenSmith authored and sstabellini committed Dec 14, 2017
1 parent 34975e5 commit d12c5b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hw/display/xenfb.c
Expand Up @@ -387,6 +387,11 @@ static void input_connected(struct XenDevice *xendev)
in->qkbd = qemu_input_handler_register((DeviceState *)in, &xenfb_keyboard);
in->qmou = qemu_input_handler_register((DeviceState *)in,
in->abs_pointer_wanted ? &xenfb_abs_mouse : &xenfb_rel_mouse);

if (in->raw_pointer_wanted) {
qemu_input_handler_activate(in->qkbd);
qemu_input_handler_activate(in->qmou);
}
}

static void input_disconnect(struct XenDevice *xendev)
Expand Down

0 comments on commit d12c5b7

Please sign in to comment.