aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 9412ff0c..1855ca49 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -31,7 +31,8 @@ static void handle_cursor_motion(struct wl_listener *listener, void *data) {
roots_cursor_handle_motion(cursor, event);
}
-static void handle_cursor_motion_absolute(struct wl_listener *listener, void *data) {
+static void handle_cursor_motion_absolute(struct wl_listener *listener,
+ void *data) {
struct roots_cursor *cursor =
wl_container_of(listener, cursor, motion_absolute);
struct wlr_event_pointer_motion_absolute *event = data;
@@ -127,7 +128,8 @@ static void handle_touch_grab_end(struct wl_listener *listener,
roots_cursor_handle_touch_grab_end(cursor, grab);
}
-static void seat_reset_device_mappings(struct roots_seat *seat, struct wlr_input_device *device) {
+static void seat_reset_device_mappings(struct roots_seat *seat,
+ struct wlr_input_device *device) {
struct wlr_cursor *cursor = seat->cursor->cursor;
struct roots_config *config = seat->input->config;
@@ -233,10 +235,12 @@ static void roots_seat_init_cursor(struct roots_seat *seat) {
wl_signal_add(&wlr_cursor->events.touch_up, &seat->cursor->touch_up);
seat->cursor->touch_up.notify = handle_touch_up;
- wl_signal_add(&wlr_cursor->events.touch_motion, &seat->cursor->touch_motion);
+ wl_signal_add(&wlr_cursor->events.touch_motion,
+ &seat->cursor->touch_motion);
seat->cursor->touch_motion.notify = handle_touch_motion;
- wl_signal_add(&wlr_cursor->events.tablet_tool_axis, &seat->cursor->tool_axis);
+ wl_signal_add(&wlr_cursor->events.tablet_tool_axis,
+ &seat->cursor->tool_axis);
seat->cursor->tool_axis.notify = handle_tool_axis;
wl_signal_add(&wlr_cursor->events.tablet_tool_tip, &seat->cursor->tool_tip);
@@ -304,9 +308,11 @@ void roots_seat_destroy(struct roots_seat *seat) {
// TODO
}
-static void seat_add_keyboard(struct roots_seat *seat, struct wlr_input_device *device) {
+static void seat_add_keyboard(struct roots_seat *seat,
+ struct wlr_input_device *device) {
assert(device->type == WLR_INPUT_DEVICE_KEYBOARD);
- struct roots_keyboard *keyboard = roots_keyboard_create(device, seat->input);
+ struct roots_keyboard *keyboard =
+ roots_keyboard_create(device, seat->input);
if (keyboard == NULL) {
wlr_log(L_ERROR, "could not allocate keyboard for seat");
return;
@@ -327,7 +333,8 @@ static void seat_add_keyboard(struct roots_seat *seat, struct wlr_input_device *
wlr_seat_set_keyboard(seat->seat, device);
}
-static void seat_add_pointer(struct roots_seat *seat, struct wlr_input_device *device) {
+static void seat_add_pointer(struct roots_seat *seat,
+ struct wlr_input_device *device) {
struct roots_pointer *pointer = calloc(sizeof(struct roots_pointer), 1);
if (!pointer) {
wlr_log(L_ERROR, "could not allocate pointer for seat");
@@ -342,7 +349,8 @@ static void seat_add_pointer(struct roots_seat *seat, struct wlr_input_device *d
roots_seat_configure_cursor(seat);
}
-static void seat_add_touch(struct roots_seat *seat, struct wlr_input_device *device) {
+static void seat_add_touch(struct roots_seat *seat,
+ struct wlr_input_device *device) {
struct roots_touch *touch = calloc(sizeof(struct roots_touch), 1);
if (!touch) {
wlr_log(L_ERROR, "could not allocate touch for seat");
@@ -357,12 +365,15 @@ static void seat_add_touch(struct roots_seat *seat, struct wlr_input_device *dev
roots_seat_configure_cursor(seat);
}
-static void seat_add_tablet_pad(struct roots_seat *seat, struct wlr_input_device *device) {
+static void seat_add_tablet_pad(struct roots_seat *seat,
+ struct wlr_input_device *device) {
// TODO
}
-static void seat_add_tablet_tool(struct roots_seat *seat, struct wlr_input_device *device) {
- struct roots_tablet_tool *tablet_tool = calloc(sizeof(struct roots_tablet_tool), 1);
+static void seat_add_tablet_tool(struct roots_seat *seat,
+ struct wlr_input_device *device) {
+ struct roots_tablet_tool *tablet_tool =
+ calloc(sizeof(struct roots_tablet_tool), 1);
if (!tablet_tool) {
wlr_log(L_ERROR, "could not allocate tablet_tool for seat");
return;