mirror of
https://github.com/swaywm/sway.git
synced 2026-04-27 06:46:25 -04:00
Register touch events in libtouch engine
This commit is contained in:
parent
6a099a753e
commit
bccc14e01b
2 changed files with 20 additions and 0 deletions
|
|
@ -36,7 +36,10 @@ struct sway_cursor {
|
|||
struct wl_listener axis;
|
||||
struct wl_listener frame;
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> Register touch events in libtouch engine
|
||||
struct libtouch_engine *gesture_engine;
|
||||
struct wl_listener touch_down;
|
||||
struct wl_listener touch_up;
|
||||
|
|
|
|||
|
|
@ -362,10 +362,16 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
|
|||
cursor_set_image(cursor, NULL, NULL);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
libtouch_engine_register_touch(engine, event->time_msec, event->touch_id,
|
||||
LIBTOUCH_TOUCH_DOWN, event->x, event->y);
|
||||
|
||||
|
||||
=======
|
||||
libtouch_engine_register_touch(cursor->gesture_engine, event->time_msec,
|
||||
event->touch_id, LIBTOUCH_TOUCH_DOWN,
|
||||
event->x, event->y);
|
||||
>>>>>>> Register touch events in libtouch engine
|
||||
}
|
||||
|
||||
static void handle_touch_up(struct wl_listener *listener, void *data) {
|
||||
|
|
@ -376,8 +382,14 @@ static void handle_touch_up(struct wl_listener *listener, void *data) {
|
|||
struct wlr_seat *seat = cursor->seat->wlr_seat;
|
||||
// TODO: fall back to cursor simulation if client has not bound to touch
|
||||
wlr_seat_touch_notify_up(seat, event->time_msec, event->touch_id);
|
||||
<<<<<<< HEAD
|
||||
libtouch_engine_register_touch(engine, event->time_msec, event->touch_id,
|
||||
LIBTOUCH_TOUCH_UP, 0,0);
|
||||
=======
|
||||
|
||||
libtouch_engine_register_touch(cursor->gesture_engine, event->time_msec,
|
||||
event->touch_id, LIBTOUCH_TOUCH_UP, 0, 0);
|
||||
>>>>>>> Register touch events in libtouch engine
|
||||
}
|
||||
|
||||
static void handle_touch_motion(struct wl_listener *listener, void *data) {
|
||||
|
|
@ -418,8 +430,13 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
|
|||
event->touch_id, sx, sy);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
libtouch_engine_register_move(engine, event->time_msec, event->touch_id,
|
||||
event->x, event->y);
|
||||
=======
|
||||
libtouch_engine_register_move(cursor->gesture_engine, event->time_msec,
|
||||
event->touch_id, event->x, event->y);
|
||||
>>>>>>> Register touch events in libtouch engine
|
||||
}
|
||||
|
||||
static double apply_mapping_from_coord(double low, double high, double value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue