aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-08-16 09:12:48 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-08-18 09:18:32 +1000
commitb637b61a7a25219991280717d9bf8a463ed4d8a8 (patch)
treeb8b0d0d5e7a13f354ede4c19746f1ebd6042f8a3 /include
parenta36625a482585e86d465df1eaa3669c1c4390a20 (diff)
downloadsway-b637b61a7a25219991280717d9bf8a463ed4d8a8.tar.xz
Rename mousedown to down and make seat operation a named enum
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/seat.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index fb03b609..c07db61c 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -35,6 +35,14 @@ struct sway_drag_icon {
struct wl_listener destroy;
};
+enum sway_seat_operation {
+ OP_NONE,
+ OP_DOWN,
+ OP_MOVE,
+ OP_RESIZE_FLOATING,
+ OP_RESIZE_TILING,
+};
+
struct sway_seat {
struct wlr_seat *wlr_seat;
struct sway_cursor *cursor;
@@ -54,14 +62,7 @@ struct sway_seat {
double touch_x, touch_y;
// Operations (drag and resize)
- enum {
- OP_NONE,
- OP_MOUSEDOWN,
- OP_MOVE,
- OP_RESIZE_FLOATING,
- OP_RESIZE_TILING,
- } operation;
-
+ enum sway_seat_operation operation;
struct sway_container *op_container;
enum wlr_edges op_resize_edge;
uint32_t op_button;
@@ -158,7 +159,7 @@ bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
void drag_icon_update_position(struct sway_drag_icon *icon);
-void seat_begin_mousedown(struct sway_seat *seat, struct sway_container *con,
+void seat_begin_down(struct sway_seat *seat, struct sway_container *con,
uint32_t button, double sx, double sy);
void seat_begin_move(struct sway_seat *seat, struct sway_container *con,