mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
Implement binding
This commit is contained in:
parent
6ccc01e9ef
commit
dda3ac15ae
2 changed files with 15 additions and 4 deletions
|
|
@ -11,5 +11,19 @@
|
||||||
#include <libtouch.h>
|
#include <libtouch.h>
|
||||||
|
|
||||||
struct cmd_results *touch_cmd_binding(int argc, char **argv) {
|
struct cmd_results *touch_cmd_binding(int argc, char **argv) {
|
||||||
return NULL;
|
struct cmd_results *error = NULL;
|
||||||
|
|
||||||
|
if((error = checkarg(argc, "binding", EXPECTED_AT_LEAST, 2))) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct gesture_config *config = get_gesture_config(argv[1]);
|
||||||
|
|
||||||
|
if (!config) {
|
||||||
|
return cmd_results_new(CMD_FAILURE, "Unable to bind gesture %s", argv[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
config->command = join_args(argv+2, argc);
|
||||||
|
return cmd_results_new(CMD_SUCCESS, NULL);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,6 @@ 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 libtouch_engine *engine = cursor->gesture_engine;
|
|
||||||
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;
|
||||||
|
|
@ -369,7 +368,6 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
static void handle_touch_up(struct wl_listener *listener, void *data) {
|
static void handle_touch_up(struct wl_listener *listener, void *data) {
|
||||||
struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_up);
|
struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_up);
|
||||||
struct libtouch_engine *engine = cursor->gesture_engine;
|
|
||||||
wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat);
|
wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat);
|
||||||
struct wlr_event_touch_up *event = data;
|
struct wlr_event_touch_up *event = data;
|
||||||
struct wlr_seat *seat = cursor->seat->wlr_seat;
|
struct wlr_seat *seat = cursor->seat->wlr_seat;
|
||||||
|
|
@ -384,7 +382,6 @@ 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 libtouch_engine *engine = cursor->gesture_engine;
|
|
||||||
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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue