]> git.mdlowis.com Git - proto/labwc.git/commitdiff
config: allow <libinput><device> without category attribute
authorJohan Malm <jgm323@gmail.com>
Mon, 1 Jan 2024 17:08:20 +0000 (17:08 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 1 Jan 2024 22:04:21 +0000 (22:04 +0000)
...to define a 'default' profile because that is likely to be more
user-friendly.

src/config/rcxml.c

index c57352a483416f7ec3c271e3f5ea19e90adc7747..9523e0e763ecb3dd7e3ed32c73d67628c6e66979 100644 (file)
@@ -445,7 +445,12 @@ get_accel_profile(const char *s)
 static void
 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();
        }