aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-01-17 18:11:20 +0100
committerBrian Ashworth <bosrsf04@gmail.com>2020-01-17 12:23:14 -0500
commitb1a63bcd84adad5bffa8ba73dbf64e05c8ce9bc9 (patch)
tree8faa854de4a7b58a564321d28ba7e65dcb46ed89
parent7c05933e5174f3204ba6ffb851b9990b2327849c (diff)
keyboard-group: two NULL keymaps are equal
Previously, creating a keyboard group without any keymap set would result in an error: Device keymap does not match keyboard group's
-rw-r--r--types/wlr_keyboard_group.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/types/wlr_keyboard_group.c b/types/wlr_keyboard_group.c
index 144132fe..71e95646 100644
--- a/types/wlr_keyboard_group.c
+++ b/types/wlr_keyboard_group.c
@@ -82,6 +82,9 @@ struct wlr_keyboard_group *wlr_keyboard_group_from_wlr_keyboard(
}
static bool keymaps_match(struct xkb_keymap *km1, struct xkb_keymap *km2) {
+ if (!km1 && !km2) {
+ return true;
+ }
if (!km1 || !km2) {
return false;
}