config: allow <libinput><device> without category attribute

...to define a 'default' profile because that is likely to be more
user-friendly.
This commit is contained in:
Johan Malm 2024-01-01 17:08:20 +00:00 committed by Johan Malm
parent 5337eda242
commit 84fcb99884

View file

@ -445,7 +445,12 @@ get_accel_profile(const char *s)
static void static void
fill_libinput_category(char *nodename, char *content) fill_libinput_category(char *nodename, char *content)
{ {
if (!strcmp(nodename, "category.device.libinput")) { /*
* Create a new profile (libinput-category) on `<libinput><device>`
* so that the 'default' profile can be created without even providing a
* category="" attribute (same as <device category="default">...)
*/
if (!strcmp(nodename, "device.libinput")) {
current_libinput_category = libinput_category_create(); current_libinput_category = libinput_category_create();
} }