From 73989666616360dfb5dca821f789bd87bc6850ab Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 19 Oct 2021 21:44:44 +0100 Subject: [PATCH] config: change libinput variables to camelCase This is more consistent with other rc.xml variables. strcasecmp() is used in src/config/rc.xml, so there are not backward compatibility issues. --- docs/labwc-config.5.scd | 12 ++++++------ src/config/rcxml.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index c83028d6..657fda35 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -120,18 +120,18 @@ Configuration must be wrapped in a root-node. this category that aren't set use the default for the device. With the exception of tap-to-click, which is enabled by default. -** [yes|no] +** [yes|no] Use natural scrolling for this category if available. -** [yes|no] +** [yes|no] Use your devices left-handed mode if available. -** +** [\-1.0 to 1.0] Set the pointer speed for this category. The speed is a number between \-1 and 1, with 0 being the default in most cases, and 1 being the fastest. -** [flat|adaptive] +** [flat|adaptive] Set the pointer's acceleration profile for this category. Flat applies no acceleration (the pointers velocity is constant), while adaptive changes the pointers speed based the actual speed of your mouse or @@ -141,12 +141,12 @@ Configuration must be wrapped in a root-node. Enable or disable tap-to-click for this category. This is enabled by default for all categories. -** [yes|no] +** [yes|no] Enable or disable middle button emulation for this category. Middle emulation processes a simultaneous left and right click as a press of the middle mouse button (scroll wheel). -*device category="">* [yes|no] +*device category="">* [yes|no] Enable or disable disable while typing for this category. DWT ignores any motion events while a keyboard is typing, and for a short while after as well. diff --git a/src/config/rcxml.c b/src/config/rcxml.c index 25aa97c5..3b5704b0 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -157,12 +157,12 @@ fill_libinput_category(char *nodename, char *content) } else { current_libinput_category->name = strdup(content); } - } else if (!strcasecmp(nodename, "naturalscroll")) { + } else if (!strcasecmp(nodename, "naturalScroll")) { current_libinput_category->natural_scroll = get_bool(content) ? 1 : 0; - } else if (!strcasecmp(nodename, "lefthanded")) { + } else if (!strcasecmp(nodename, "leftHanded")) { current_libinput_category->left_handed = get_bool(content) ? 1 : 0; - } else if (!strcmp(nodename, "pointerspeed")) { + } else if (!strcasecmp(nodename, "pointerSpeed")) { current_libinput_category->pointer_speed = atof(content); if (current_libinput_category->pointer_speed < -1) { current_libinput_category->pointer_speed = -1; @@ -173,13 +173,13 @@ fill_libinput_category(char *nodename, char *content) current_libinput_category->tap = get_bool(content) ? LIBINPUT_CONFIG_TAP_ENABLED : LIBINPUT_CONFIG_TAP_DISABLED; - } else if (!strcasecmp(nodename, "accelprofile")) { + } else if (!strcasecmp(nodename, "accelProfile")) { current_libinput_category->accel_profile = get_accel_profile(content); - } else if (!strcasecmp(nodename, "middleemulation")) { + } else if (!strcasecmp(nodename, "middleEmulation")) { current_libinput_category->middle_emu = get_bool(content) ? LIBINPUT_CONFIG_MIDDLE_EMULATION_ENABLED : LIBINPUT_CONFIG_MIDDLE_EMULATION_DISABLED; - } else if (!strcasecmp(nodename, "disablewhiletyping")) { + } else if (!strcasecmp(nodename, "disableWhileTyping")) { current_libinput_category->dwt = get_bool(content) ? LIBINPUT_CONFIG_DWT_ENABLED : LIBINPUT_CONFIG_DWT_DISABLED;