localed: consider an unset model as a wildcard

This commit is contained in:
Michal Sekletar
2014-07-02 16:11:50 +02:00
committed by Lennart Poettering
parent 5e91345094
commit 387066c2e5
+7 -6
View File
@@ -712,15 +712,16 @@ static int find_legacy_keymap(Context *c, char **new_keymap) {
}
}
if (matching > 0 &&
streq_ptr(c->x11_model, a[2])) {
matching++;
if (streq_ptr(c->x11_variant, a[3])) {
if (matching > 0) {
if (isempty(c->x11_model) || streq_ptr(c->x11_model, a[2])) {
matching++;
if (streq_ptr(c->x11_options, a[4]))
if (streq_ptr(c->x11_variant, a[3])) {
matching++;
if (streq_ptr(c->x11_options, a[4]))
matching++;
}
}
}