Remove empty lines

This commit is contained in:
Samuel Grahn 2019-04-22 14:40:23 +02:00
parent d70e55e0ef
commit 90cbe9ce03
7 changed files with 7 additions and 18 deletions

View file

@ -17,7 +17,6 @@ static struct cmd_handler touch_handlers[] = {
{ "target", touch_cmd_target }, { "target", touch_cmd_target },
}; };
struct cmd_results *cmd_touch(int argc, char **argv) { struct cmd_results *cmd_touch(int argc, char **argv) {
struct cmd_results *error = NULL; struct cmd_results *error = NULL;
if ((error = checkarg(argc, "touch", EXPECTED_AT_LEAST, 2))) { if ((error = checkarg(argc, "touch", EXPECTED_AT_LEAST, 2))) {

View file

@ -25,6 +25,5 @@ struct cmd_results *touch_cmd_binding(int argc, char **argv) {
sway_log(SWAY_DEBUG, "libtouch: Bound gesture %s", argv[0]); sway_log(SWAY_DEBUG, "libtouch: Bound gesture %s", argv[0]);
config->command = join_args(argv + 1, argc - 1); config->command = join_args(argv + 1, argc - 1);
return cmd_results_new(CMD_SUCCESS, NULL); return cmd_results_new(CMD_SUCCESS, NULL);
}; };

View file

@ -46,7 +46,5 @@ struct cmd_results *touch_cmd_target(int argc, char **argv) {
} }
conf->target = target; conf->target = target;
return cmd_results_new(CMD_SUCCESS, "Created target: %s", argv[0]); return cmd_results_new(CMD_SUCCESS, "Created target: %s", argv[0]);
}; };

View file

@ -4,6 +4,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <libgen.h> #include <libgen.h>
#include <libtouch.h>
#include <wordexp.h> #include <wordexp.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
@ -30,7 +31,6 @@
#include "stringop.h" #include "stringop.h"
#include "list.h" #include "list.h"
#include "log.h" #include "log.h"
#include <libtouch.h>
struct sway_config *config = NULL; struct sway_config *config = NULL;
@ -132,7 +132,6 @@ void free_config(struct sway_config *config) {
} }
list_free(config->criteria); list_free(config->criteria);
} }
list_free(config->no_focus); list_free(config->no_focus);
list_free(config->active_bar_modifiers); list_free(config->active_bar_modifiers);
list_free_items_and_destroy(config->config_chain); list_free_items_and_destroy(config->config_chain);

View file

@ -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); struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_down);
wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat);
struct wlr_event_touch_down *event = data; struct wlr_event_touch_down *event = data;
struct sway_seat *seat = cursor->seat; struct sway_seat *seat = cursor->seat;
struct wlr_seat *wlr_seat = seat->wlr_seat; struct wlr_seat *wlr_seat = seat->wlr_seat;
struct wlr_surface *surface = NULL; struct wlr_surface *surface = NULL;
@ -379,7 +380,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
return; 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)) { if (seat_is_input_allowed(seat, surface)) {
wlr_seat_touch_notify_down(wlr_seat, surface, event->time_msec, wlr_seat_touch_notify_down(wlr_seat, surface, event->time_msec,
event->touch_id, sx, sy); 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); wl_container_of(listener, cursor, touch_motion);
wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat);
struct wlr_event_touch_motion *event = data; struct wlr_event_touch_motion *event = data;
struct sway_seat *seat = cursor->seat; struct sway_seat *seat = cursor->seat;
struct wlr_seat *wlr_seat = seat->wlr_seat; struct wlr_seat *wlr_seat = seat->wlr_seat;
struct wlr_surface *surface = NULL; struct wlr_surface *surface = NULL;
double lx, ly; double lx, ly;
wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device, wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device,
event->x, event->y, &lx, &ly); event->x, event->y, &lx, &ly);
double sx, sy; double sx, sy;
node_at_coords(cursor->seat, lx, ly, &surface, &sx, &sy); node_at_coords(cursor->seat, lx, ly, &surface, &sx, &sy);
sway_log(SWAY_DEBUG, "move gesture"); sway_log(SWAY_DEBUG, "move gesture");
libtouch_progress_register_move(cursor->gesture_tracker, event->time_msec, libtouch_progress_register_move(cursor->gesture_tracker, event->time_msec,
event->touch_id, lx,ly); event->touch_id, lx,ly);
@ -439,7 +439,7 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
if (!surface) { if (!surface) {
return; 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(cursor->seat, surface)) { if (seat_is_input_allowed(cursor->seat, surface)) {
wlr_seat_touch_notify_motion(wlr_seat, event->time_msec, 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) { static double apply_mapping_from_coord(double low, double high, double value) {
if (isnan(value)) { if (isnan(value)) {
return value; return value;

View file

@ -600,11 +600,8 @@ static void seat_configure_touch(struct sway_seat *seat,
wlr_cursor_attach_input_device(seat->cursor->cursor, wlr_cursor_attach_input_device(seat->cursor->cursor,
sway_device->input_device->wlr_device); sway_device->input_device->wlr_device);
seat_apply_input_config(seat, sway_device); seat_apply_input_config(seat, sway_device);
} }
static void seat_configure_tablet_tool(struct sway_seat *seat, static void seat_configure_tablet_tool(struct sway_seat *seat,
struct sway_seat_device *sway_device) { struct sway_seat_device *sway_device) {
seat_configure_xcursor(seat); 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) { wl_list_for_each(seat_device, &seat->devices, link) {
seat_configure_device(seat, seat_device->input_device); seat_configure_device(seat, seat_device->input_device);
} }
if(config->gesture_engine) { if(config->gesture_engine) {
sway_log(SWAY_DEBUG, "gesture engine exists"); sway_log(SWAY_DEBUG, "gesture engine exists");
if(seat->cursor->gesture_tracker) { if(seat->cursor->gesture_tracker) {

View file

@ -188,8 +188,6 @@ sway_sources = files(
'commands/touch/gesture/rotate.c', 'commands/touch/gesture/rotate.c',
'commands/touch/gesture/pinch.c', 'commands/touch/gesture/pinch.c',
'commands/touch/gesture/delay.c', 'commands/touch/gesture/delay.c',
'tree/arrange.c', 'tree/arrange.c',
'tree/container.c', 'tree/container.c',