mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 04:58:00 +02:00
Merge branch 'fix-xkb-crash' into 'main'
ply-device-manager: Handle XKB failing to load more gracefully See merge request plymouth/plymouth!280
This commit is contained in:
commit
aed498e026
1 changed files with 5 additions and 1 deletions
|
|
@ -849,7 +849,7 @@ parse_vconsole_conf (ply_device_manager_t *manager)
|
|||
|
||||
ply_trace ("KEYMAP: %s, XKBLAYOUT: %s, XKBMODEL %s, XKBVARIANT: %s, XKBOPTIONS: %s\n", keymap, xkb_layout, xkb_model, xkb_variant, xkb_options);
|
||||
|
||||
if (xkb_layout != NULL) {
|
||||
if (xkb_layout != NULL && manager->xkb_context != NULL) {
|
||||
struct xkb_rule_names xkb_keymap = {
|
||||
.layout = xkb_layout,
|
||||
.model = xkb_model,
|
||||
|
|
@ -879,6 +879,10 @@ ply_device_manager_new (const char *default_tty,
|
|||
manager = calloc (1, sizeof(ply_device_manager_t));
|
||||
manager->loop = NULL;
|
||||
manager->xkb_context = xkb_context_new (XKB_CONTEXT_NO_FLAGS);
|
||||
|
||||
if (manager->xkb_context == NULL)
|
||||
ply_trace ("Could not allocate xkb context: %m");
|
||||
|
||||
parse_vconsole_conf (manager);
|
||||
|
||||
manager->terminals = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue