keyboard: Fix fallback layout when using variants

Commit c1ec7b2ff meant to fall back to the base layout in case
a variant like `fr+oss` is set up, but as we are checking for
'+' on the array rather than the layout name, the fallback only
"works" for a layout that is literally called '+', whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2471
This commit is contained in:
Florian Müllner 2020-03-23 16:14:47 +01:00
parent 61beccf733
commit d29e5765ba

View File

@ -498,7 +498,7 @@ var Key = GObject.registerClass({
var KeyboardModel = class { var KeyboardModel = class {
constructor(groupName) { constructor(groupName) {
let names = [groupName]; let names = [groupName];
if (names.includes('+')) if (groupName.includes('+'))
names.push(groupName.replace(/\+.*/, '')); names.push(groupName.replace(/\+.*/, ''));
names.push('us'); names.push('us');