diff --git a/sway/commands/touch.c b/sway/commands/touch.c index dcf2c5151..bd67bb7c8 100644 --- a/sway/commands/touch.c +++ b/sway/commands/touch.c @@ -17,7 +17,6 @@ static struct cmd_handler touch_handlers[] = { { "target", touch_cmd_target }, }; - struct cmd_results *cmd_touch(int argc, char **argv) { struct cmd_results *error = NULL; if ((error = checkarg(argc, "touch", EXPECTED_AT_LEAST, 2))) { diff --git a/sway/commands/touch/binding.c b/sway/commands/touch/binding.c index af6858704..f23c986b3 100644 --- a/sway/commands/touch/binding.c +++ b/sway/commands/touch/binding.c @@ -25,6 +25,5 @@ struct cmd_results *touch_cmd_binding(int argc, char **argv) { sway_log(SWAY_DEBUG, "libtouch: Bound gesture %s", argv[0]); config->command = join_args(argv + 1, argc - 1); - return cmd_results_new(CMD_SUCCESS, NULL); - + return cmd_results_new(CMD_SUCCESS, NULL); }; diff --git a/sway/commands/touch/target.c b/sway/commands/touch/target.c index 17af3499f..86ca8121f 100644 --- a/sway/commands/touch/target.c +++ b/sway/commands/touch/target.c @@ -46,7 +46,5 @@ struct cmd_results *touch_cmd_target(int argc, char **argv) { } conf->target = target; - - return cmd_results_new(CMD_SUCCESS, "Created target: %s", argv[0]); }; diff --git a/sway/config.c b/sway/config.c index 51159c55c..8c4d03ac0 100644 --- a/sway/config.c +++ b/sway/config.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include "stringop.h" #include "list.h" #include "log.h" -#include struct sway_config *config = NULL; @@ -132,7 +132,6 @@ void free_config(struct sway_config *config) { } list_free(config->criteria); } - list_free(config->no_focus); list_free(config->active_bar_modifiers); list_free_items_and_destroy(config->config_chain); diff --git a/sway/input/cursor.c b/sway/input/cursor.c index a030cf6ea..a7aa44611 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -353,6 +353,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_down); wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); struct wlr_event_touch_down *event = data; + struct sway_seat *seat = cursor->seat; struct wlr_seat *wlr_seat = seat->wlr_seat; struct wlr_surface *surface = NULL; @@ -379,7 +380,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { return; } - // TODO: fall back to cursor simulation if client has not bound to touch + // TODO: fall back to cursor simulation if client has not bound to touch if (seat_is_input_allowed(seat, surface)) { wlr_seat_touch_notify_down(wlr_seat, surface, event->time_msec, event->touch_id, sx, sy); @@ -406,18 +407,17 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) { wl_container_of(listener, cursor, touch_motion); wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); struct wlr_event_touch_motion *event = data; + struct sway_seat *seat = cursor->seat; struct wlr_seat *wlr_seat = seat->wlr_seat; struct wlr_surface *surface = NULL; - double lx, ly; wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device, event->x, event->y, &lx, &ly); double sx, sy; node_at_coords(cursor->seat, lx, ly, &surface, &sx, &sy); - sway_log(SWAY_DEBUG, "move gesture"); libtouch_progress_register_move(cursor->gesture_tracker, event->time_msec, event->touch_id, lx,ly); @@ -439,7 +439,7 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) { if (!surface) { return; } - + // TODO: fall back to cursor simulation if client has not bound to touch if (seat_is_input_allowed(cursor->seat, surface)) { wlr_seat_touch_notify_motion(wlr_seat, event->time_msec, @@ -447,8 +447,6 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) { } } - - static double apply_mapping_from_coord(double low, double high, double value) { if (isnan(value)) { return value; diff --git a/sway/input/seat.c b/sway/input/seat.c index de2352c8a..251d1892e 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -600,11 +600,8 @@ static void seat_configure_touch(struct sway_seat *seat, wlr_cursor_attach_input_device(seat->cursor->cursor, sway_device->input_device->wlr_device); seat_apply_input_config(seat, sway_device); - - } - static void seat_configure_tablet_tool(struct sway_seat *seat, struct sway_seat_device *sway_device) { seat_configure_xcursor(seat); @@ -1193,6 +1190,7 @@ void seat_apply_config(struct sway_seat *seat, wl_list_for_each(seat_device, &seat->devices, link) { seat_configure_device(seat, seat_device->input_device); } + if(config->gesture_engine) { sway_log(SWAY_DEBUG, "gesture engine exists"); if(seat->cursor->gesture_tracker) { diff --git a/sway/meson.build b/sway/meson.build index f4e2cb8ec..b5e43f264 100644 --- a/sway/meson.build +++ b/sway/meson.build @@ -188,8 +188,6 @@ sway_sources = files( 'commands/touch/gesture/rotate.c', 'commands/touch/gesture/pinch.c', 'commands/touch/gesture/delay.c', - - 'tree/arrange.c', 'tree/container.c',