mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 10:14:14 +00:00
Now is possible change the pointer speed and change the accel profile
This commit is contained in:
parent
3c83e0cfb8
commit
92800d7866
10
config.def.h
10
config.def.h
@ -51,6 +51,16 @@ static const int repeat_delay = 600;
|
||||
static const int tap_to_click = 1;
|
||||
static const int natural_scrolling = 0;
|
||||
|
||||
/* Define the accel profile, the posible values can be */
|
||||
/* LIBINPUT_CONFIG_ACCEL_PROFILE_NONE */
|
||||
/* LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT (this disables the acceleration). */
|
||||
/* LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE (this is the default profile for most devices). */
|
||||
#define ACCEL_PROFILE LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
||||
|
||||
/* Set the pointer acceleration of this pointer device within a range of [-1,1]. */
|
||||
/* 0 is the default value, -1 is slowest acceleration and 1 is the maximun accel */
|
||||
static const double pointer_speed = 0;
|
||||
|
||||
#define MODKEY WLR_MODIFIER_ALT
|
||||
#define TAGKEYS(KEY,SKEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
|
||||
7
dwl.c
7
dwl.c
@ -949,6 +949,13 @@ createpointer(struct wlr_input_device *device)
|
||||
|
||||
if (libinput_device_config_scroll_has_natural_scroll(libinput_device))
|
||||
libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling);
|
||||
|
||||
if (libinput_device_config_accel_is_available(libinput_device) && pointer_speed)
|
||||
libinput_device_config_accel_set_speed(libinput_device, pointer_speed);
|
||||
|
||||
#ifdef ACCEL_PROFILE
|
||||
libinput_device_config_accel_set_profile(libinput_device, ACCEL_PROFILE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* We don't do anything special with pointers. All of our pointer handling
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user