Skip to content

Commit

Permalink
fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP committed Feb 13, 2019
1 parent d79fdb8 commit f83005b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/slurp.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ struct slurp_seat {
int32_t pressed_x, pressed_y;
};

void seat_get_box(struct slurp_seat *seat, struct slurp_box * result);
void seat_get_box(struct slurp_seat *seat, struct slurp_box *result);

#endif
6 changes: 2 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ static int min(int a, int b) {
return (a < b) ? a : b;
}

void seat_get_box(struct slurp_seat *seat, struct slurp_box * result) {
void seat_get_box(struct slurp_seat *seat, struct slurp_box *result) {
result->x = min(seat->pressed_x, seat->x);
result->y = min(seat->pressed_y, seat->y);
result->width = abs(seat->x - seat->pressed_x);
result->height = abs(seat->y - seat->pressed_y);
}

static void keyboard_handle_key(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, uint32_t time, uint32_t key, uint32_t key_state) {
uint32_t serial, uint32_t time, uint32_t key, uint32_t key_state) {
struct slurp_seat *seat = data;
struct slurp_state *state = seat->state;
if (key_state == WL_KEYBOARD_KEY_STATE_PRESSED) {
Expand Down Expand Up @@ -153,8 +153,6 @@ static void create_seat(struct slurp_state *state, struct wl_seat *wl_seat) {
return;
}
seat->state = state;
seat->wl_pointer = NULL;
seat->wl_keyboard = NULL;
seat->wl_seat = wl_seat;
wl_list_insert(&state->seats, &seat->link);
wl_seat_add_listener(wl_seat, &seat_listener, seat);
Expand Down

0 comments on commit f83005b

Please sign in to comment.