Skip to content

Commit 79205c3

Browse files
committed
rdp backend: reset default keymap if mapping fails
Reload default global compositor keymap when no xkb mapping is found for current keyboard layout. This will default to the keymap in weston.ini or to "us" if no keymap is defined there. Should allow to use custom KLC layouts for keymaps that exist in Linux but have no correspondence in Windows (e.g. altgr-intl). This should also partially fix #173. Still need a way to export weston.ini to the user.
1 parent db64e98 commit 79205c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libweston/backend-rdp/rdprail.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,14 @@ rail_client_LanguageImeInfo_callback(bool freeOnly, void *arg)
10011001
__func__, new_keyboard_layout,
10021002
settings->KeyboardType,
10031003
settings->KeyboardSubType);
1004+
1005+
rdp_debug_error(b, "%s: Resetting default keymap\n", __func__);
1006+
keymap = xkb_keymap_new_from_names(peer_ctx->item.seat->compositor->xkb_context,
1007+
&peer_ctx->item.seat->compositor->xkb_names,
1008+
0);
1009+
weston_seat_update_keymap(peer_ctx->item.seat, keymap);
1010+
xkb_keymap_unref(keymap);
1011+
settings->KeyboardLayout = new_keyboard_layout;
10041012
}
10051013
}
10061014
}

0 commit comments

Comments
 (0)