backend/libinput: code style consistency

Reduce a level of identation in "handle_pointer_axis" to keep the
consistency with "handle_pointer_axis_value120".
This commit is contained in:
José Expósito 2022-02-25 17:30:51 +01:00
parent c6032d6b1c
commit e00f042f80

View file

@ -103,7 +103,10 @@ void handle_pointer_axis(struct libinput_event *event,
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL,
}; };
for (size_t i = 0; i < sizeof(axes) / sizeof(axes[0]); ++i) { for (size_t i = 0; i < sizeof(axes) / sizeof(axes[0]); ++i) {
if (libinput_event_pointer_has_axis(pevent, axes[i])) { if (!libinput_event_pointer_has_axis(pevent, axes[i])) {
continue;
}
switch (axes[i]) { switch (axes[i]) {
case LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL: case LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL:
wlr_event.orientation = WLR_AXIS_ORIENTATION_VERTICAL; wlr_event.orientation = WLR_AXIS_ORIENTATION_VERTICAL;
@ -119,7 +122,6 @@ void handle_pointer_axis(struct libinput_event *event,
wlr_event.delta_discrete *= WLR_POINTER_AXIS_DISCRETE_STEP; wlr_event.delta_discrete *= WLR_POINTER_AXIS_DISCRETE_STEP;
wlr_signal_emit_safe(&pointer->events.axis, &wlr_event); wlr_signal_emit_safe(&pointer->events.axis, &wlr_event);
} }
}
wlr_signal_emit_safe(&pointer->events.frame, pointer); wlr_signal_emit_safe(&pointer->events.frame, pointer);
} }