ui: fix keymap file search in input-barrier object
commit707f75070a94c28889f887deef0ab4da09e25ddf
authorLaurent Vivier <laurent@vivier.eu>
Mon, 23 Sep 2019 22:06:58 +0000 (24 00:06 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 18 Oct 2019 08:40:46 +0000 (18 10:40 +0200)
treee66eb448e1ae5e45fe54f30bf61ef18c7a181d06
parent30f5a9dd7a6252d31fb73ab5193f3be1be7766c7
ui: fix keymap file search in input-barrier object

If we try to start QEMU with "-k en-us", qemu prints a message and exits
with:

    qemu-system-i386: could not read keymap file: 'en-us'

It's because this function is called way too early, before
qemu_add_data_dir() is called, and so qemu_find_file() fails.

To fix that, move init_keyboard_layout() from the class init function to the
instance init function.

Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-id: 20190923220658.27007-1-laurent@vivier.eu
Fixes: 6105683da35b ("ui: add an embedded Barrier client")
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/input-barrier.c