diff --git a/src/evdev-middle-button.c b/src/evdev-middle-button.c index 98ac8872..48330d39 100644 --- a/src/evdev-middle-button.c +++ b/src/evdev-middle-button.c @@ -43,8 +43,6 @@ * as-is. */ -#define CASE_RETURN_STRING(a) case a: return #a; - static inline const char* middlebutton_state_to_str(enum evdev_middlebutton_state state) { diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 6aa74c31..9cfa491c 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -46,8 +46,6 @@ * The state machine only affects the soft button area code. */ -#define CASE_RETURN_STRING(a) case a: return #a; - static inline const char* button_state_to_str(enum button_state state) { switch(state) { diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c index ade55e03..aa9197f0 100644 --- a/src/evdev-mt-touchpad-edge-scroll.c +++ b/src/evdev-mt-touchpad-edge-scroll.c @@ -32,8 +32,6 @@ #include "evdev-mt-touchpad.h" -#define CASE_RETURN_STRING(a) case a: return #a - /* Use a reasonably large threshold until locked into scrolling mode, to avoid accidentally locking in scrolling mode when trying to use the entire touchpad to move the pointer. The user can wait for the timeout to trigger diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index a23b5ce1..5c10dc35 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -32,8 +32,6 @@ #define DEFAULT_GESTURE_SWITCH_TIMEOUT 100 /* ms */ #define DEFAULT_GESTURE_2FG_SCROLL_TIMEOUT 1000 /* ms */ -#define CASE_RETURN_STRING(a) case a: return #a - static inline const char* gesture_state_to_str(enum tp_gesture_2fg_state state) { diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 9bbf6b88..1354e899 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -35,8 +35,6 @@ #include "evdev-mt-touchpad.h" -#define CASE_RETURN_STRING(a) case a: return #a - #define DEFAULT_TAP_TIMEOUT_PERIOD 180 #define DEFAULT_DRAG_TIMEOUT_PERIOD 300 #define DEFAULT_TAP_MOVE_THRESHOLD TP_MM_TO_DPI_NORMALIZED(3) @@ -98,7 +96,6 @@ tap_event_to_str(enum tap_event event) } return NULL; } -#undef CASE_RETURN_STRING static void tp_tap_notify(struct tp_dispatch *tp, diff --git a/src/libinput-util.h b/src/libinput-util.h index b18aece5..12f6d981 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -41,6 +41,8 @@ /* The HW DPI rate we normalize to before calculating pointer acceleration */ #define DEFAULT_MOUSE_DPI 1000 +#define CASE_RETURN_STRING(a) case a: return #a; + void set_logging_enabled(int enabled);