diff --git a/include/config/libinput.h b/include/config/libinput.h index d05b8489..ae362ab4 100644 --- a/include/config/libinput.h +++ b/include/config/libinput.h @@ -8,12 +8,10 @@ enum device_type { LAB_LIBINPUT_DEVICE_NONE = 0, - - // FIXME: Rename the entries below with a LAB_LIBINPUT_ prefix - DEFAULT_DEVICE, - TOUCH_DEVICE, - TOUCHPAD_DEVICE, - NON_TOUCH_DEVICE, + LAB_LIBINPUT_DEVICE_DEFAULT, + LAB_LIBINPUT_DEVICE_TOUCH, + LAB_LIBINPUT_DEVICE_TOUCHPAD, + LAB_LIBINPUT_DEVICE_NON_TOUCH, }; struct libinput_category { diff --git a/src/config/libinput.c b/src/config/libinput.c index 4b61d546..b2a1970e 100644 --- a/src/config/libinput.c +++ b/src/config/libinput.c @@ -10,7 +10,7 @@ static void libinput_category_init(struct libinput_category *l) { - l->type = DEFAULT_DEVICE; + l->type = LAB_LIBINPUT_DEVICE_DEFAULT; l->name = NULL; l->pointer_speed = -2; l->natural_scroll = -1; @@ -31,16 +31,16 @@ get_device_type(const char *s) return LAB_LIBINPUT_DEVICE_NONE; } if (!strcasecmp(s, "default")) { - return DEFAULT_DEVICE; + return LAB_LIBINPUT_DEVICE_DEFAULT; } if (!strcasecmp(s, "touch")) { - return TOUCH_DEVICE; + return LAB_LIBINPUT_DEVICE_TOUCH; } if (!strcasecmp(s, "touchpad")) { - return TOUCHPAD_DEVICE; + return LAB_LIBINPUT_DEVICE_TOUCHPAD; } if (!strcasecmp(s, "non-touch")) { - return NON_TOUCH_DEVICE; + return LAB_LIBINPUT_DEVICE_NON_TOUCH; } return LAB_LIBINPUT_DEVICE_NONE; } @@ -64,7 +64,7 @@ libinput_category_get_default(void) * 'default' profiles were created. */ wl_list_for_each_reverse(l, &rc.libinput_categories, link) { - if (l->type == DEFAULT_DEVICE) { + if (l->type == LAB_LIBINPUT_DEVICE_DEFAULT) { return l; } } diff --git a/src/seat.c b/src/seat.c index 4696f589..f5564416 100644 --- a/src/seat.c +++ b/src/seat.c @@ -39,7 +39,7 @@ device_type_from_wlr_device(struct wlr_input_device *wlr_input_device) switch (wlr_input_device->type) { case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TABLET_TOOL: - return TOUCH_DEVICE; + return LAB_LIBINPUT_DEVICE_TOUCH; default: break; } @@ -50,11 +50,11 @@ device_type_from_wlr_device(struct wlr_input_device *wlr_input_device) wlr_libinput_get_device_handle(wlr_input_device); if (libinput_device_config_tap_get_finger_count(libinput_device) > 0) { - return TOUCHPAD_DEVICE; + return LAB_LIBINPUT_DEVICE_TOUCHPAD; } } - return NON_TOUCH_DEVICE; + return LAB_LIBINPUT_DEVICE_NON_TOUCH; } /*