--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef LABWC_TOUCH_H
+#define LABWC_TOUCH_H
+
+struct seat;
+
+void touch_init(struct seat *seat);
+void touch_finish(struct seat *seat);
+
+#endif /* LABWC_TOUCH_H */
bool keyboard_any_modifiers_pressed(struct wlr_keyboard *keyboard);
void keyboard_finish(struct seat *seat);
-void touch_init(struct seat *seat);
-void touch_finish(struct seat *seat);
-
void seat_init(struct server *server);
void seat_finish(struct server *server);
void seat_reconfigure(struct server *server);
#include "dnd.h"
#include "idle.h"
#include "input/gestures.h"
+#include "input/touch.h"
#include "labwc.h"
#include "menu/menu.h"
#include "regions.h"
wl_signal_add(&seat->cursor->events.frame, &seat->cursor_frame);
gestures_init(seat);
+ touch_init(seat);
seat->request_cursor.notify = request_cursor_notify;
wl_signal_add(&seat->seat->events.request_set_cursor,
wl_list_remove(&seat->cursor_frame.link);
gestures_finish(seat);
+ touch_finish(seat);
wl_list_remove(&seat->request_cursor.link);
wl_list_remove(&seat->request_set_selection.link);
// SPDX-License-Identifier: GPL-2.0-only
#include <wayland-util.h>
#include <wlr/types/wlr_touch.h>
-#include "idle.h"
-#include "labwc.h"
#include "common/mem.h"
#include "common/scene-helpers.h"
+#include "idle.h"
+#include "input/touch.h"
+#include "labwc.h"
/* Holds layout -> surface offsets to report motion events in relative coords */
struct touch_point {
}
wlr_cursor_attach_output_layout(seat->cursor, server->output_layout);
- keyboard_init(seat);
cursor_init(seat);
- touch_init(seat);
+ keyboard_init(seat);
}
void
input_device_destroy(&input->destroy, NULL);
}
- keyboard_finish(seat);
- /*
- * Caution - touch_finish() unregisters event listeners from
- * seat->cursor and must come before cursor_finish(), otherwise
- * a use-after-free occurs.
- */
- touch_finish(seat);
cursor_finish(seat);
+ keyboard_finish(seat);
}
static void