mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-03 02:23:16 +00:00
weston: deprecate enable_tap in favour of enable-tap
This is to increase consistency in config option naming in weston.ini. (Prefer hyphens over underscores to separate words.) If enable_tap is present in weston.ini, an obnoxious error message is logged with weston_log(). In terms of configuration, if enable-tap is present, enable_tap is ignored. Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
This commit is contained in:
parent
b6dae6caa3
commit
9d2220380a
|
@ -1464,21 +1464,27 @@ configure_input_device(struct weston_compositor *compositor,
|
|||
{
|
||||
struct weston_config_section *s;
|
||||
struct weston_config *config = wet_get_config(compositor);
|
||||
int has_enable_tap = 0;
|
||||
int enable_tap;
|
||||
int enable_tap_default;
|
||||
|
||||
s = weston_config_get_section(config,
|
||||
"libinput", NULL, NULL);
|
||||
|
||||
if (libinput_device_config_tap_get_finger_count(device) > 0) {
|
||||
enable_tap_default =
|
||||
libinput_device_config_tap_get_default_enabled(
|
||||
device);
|
||||
weston_config_section_get_bool(s, "enable_tap",
|
||||
&enable_tap,
|
||||
enable_tap_default);
|
||||
libinput_device_config_tap_set_enabled(device,
|
||||
enable_tap);
|
||||
if (weston_config_section_get_bool(s, "enable_tap",
|
||||
&enable_tap, 0) == 0) {
|
||||
weston_log("!!DEPRECATION WARNING!!: In weston.ini, "
|
||||
"enable_tap is deprecated in favour of "
|
||||
"enable-tap. Support for it may be removed "
|
||||
"at any time!");
|
||||
has_enable_tap = 1;
|
||||
}
|
||||
if (weston_config_section_get_bool(s, "enable-tap",
|
||||
&enable_tap, 0) == 0)
|
||||
has_enable_tap = 1;
|
||||
if (has_enable_tap)
|
||||
libinput_device_config_tap_set_enabled(device,
|
||||
enable_tap);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ backend.
|
|||
.PP
|
||||
Available configuration are:
|
||||
.TP 7
|
||||
.BI "enable_tap=" true
|
||||
.BI "enable-tap=" true
|
||||
enables tap to click on touchpad devices
|
||||
.TP 7
|
||||
.BI "touchscreen_calibrator=" true
|
||||
|
|
|
@ -60,7 +60,7 @@ path=@libexecdir@/weston-keyboard
|
|||
#transform=flipped-90
|
||||
|
||||
#[libinput]
|
||||
#enable_tap=true
|
||||
#enable-tap=true
|
||||
|
||||
#[touchpad]
|
||||
#constant_accel_factor = 50
|
||||
|
|
Loading…
Reference in a new issue