aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-16 09:12:48 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-18 09:18:32 +1000
commitb637b61a7a25219991280717d9bf8a463ed4d8a8 (patch)
treeb8b0d0d5e7a13f354ede4c19746f1ebd6042f8a3 /include/sway/input/seat.h
parentImplement mousedown operation (diff)
downloadsway-b637b61a7a25219991280717d9bf8a463ed4d8a8.tar.gz
sway-b637b61a7a25219991280717d9bf8a463ed4d8a8.tar.zst
sway-b637b61a7a25219991280717d9bf8a463ed4d8a8.zip
Rename mousedown to down and make seat operation a named enum
Diffstat (limited to 'include/sway/input/seat.h')
-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 {
35 struct wl_listener destroy; 35 struct wl_listener destroy;
36}; 36};
37 37
38enum sway_seat_operation {
39 OP_NONE,
40 OP_DOWN,
41 OP_MOVE,
42 OP_RESIZE_FLOATING,
43 OP_RESIZE_TILING,
44};
45
38struct sway_seat { 46struct sway_seat {
39 struct wlr_seat *wlr_seat; 47 struct wlr_seat *wlr_seat;
40 struct sway_cursor *cursor; 48 struct sway_cursor *cursor;
@@ -54,14 +62,7 @@ struct sway_seat {
54 double touch_x, touch_y; 62 double touch_x, touch_y;
55 63
56 // Operations (drag and resize) 64 // Operations (drag and resize)
57 enum { 65 enum sway_seat_operation operation;
58 OP_NONE,
59 OP_MOUSEDOWN,
60 OP_MOVE,
61 OP_RESIZE_FLOATING,
62 OP_RESIZE_TILING,
63 } operation;
64
65 struct sway_container *op_container; 66 struct sway_container *op_container;
66 enum wlr_edges op_resize_edge; 67 enum wlr_edges op_resize_edge;
67 uint32_t op_button; 68 uint32_t op_button;
@@ -158,7 +159,7 @@ bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
158 159
159void drag_icon_update_position(struct sway_drag_icon *icon); 160void drag_icon_update_position(struct sway_drag_icon *icon);
160 161
161void seat_begin_mousedown(struct sway_seat *seat, struct sway_container *con, 162void seat_begin_down(struct sway_seat *seat, struct sway_container *con,
162 uint32_t button, double sx, double sy); 163 uint32_t button, double sx, double sy);
163 164
164void seat_begin_move(struct sway_seat *seat, struct sway_container *con, 165void seat_begin_move(struct sway_seat *seat, struct sway_container *con,