aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-21 11:23:48 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-22 23:10:19 +1000
commit9df660ee3188386c907d8feb999636ce8d61d095 (patch)
treeeb9343b66221d664ac995995d7bcceb45d25ee94 /include/sway/input/seat.h
parentPrevent re-uploading the same cursor image multiple times (diff)
downloadsway-9df660ee3188386c907d8feb999636ce8d61d095.tar.gz
sway-9df660ee3188386c907d8feb999636ce8d61d095.tar.zst
sway-9df660ee3188386c907d8feb999636ce8d61d095.zip
Store last button and use it when views request to move or resize
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index cd36ef5a..ab25788f 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -68,6 +68,9 @@ struct sway_seat {
68 double op_ref_width, op_ref_height; // container's size at start of op 68 double op_ref_width, op_ref_height; // container's size at start of op
69 double op_ref_con_lx, op_ref_con_ly; // container's x/y at start of op 69 double op_ref_con_lx, op_ref_con_ly; // container's x/y at start of op
70 70
71 uint32_t last_button;
72 uint32_t last_button_serial;
73
71 struct wl_listener focus_destroy; 74 struct wl_listener focus_destroy;
72 struct wl_listener new_container; 75 struct wl_listener new_container;
73 struct wl_listener new_drag_icon; 76 struct wl_listener new_drag_icon;
@@ -150,11 +153,15 @@ bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
150 153
151void drag_icon_update_position(struct sway_drag_icon *icon); 154void drag_icon_update_position(struct sway_drag_icon *icon);
152 155
153void seat_begin_move(struct sway_seat *seat, struct sway_container *con); 156void seat_begin_move(struct sway_seat *seat, struct sway_container *con,
157 uint32_t button);
154 158
155void seat_begin_resize(struct sway_seat *seat, struct sway_container *con, 159void seat_begin_resize(struct sway_seat *seat, struct sway_container *con,
156 uint32_t button, enum wlr_edges edge); 160 uint32_t button, enum wlr_edges edge);
157 161
158void seat_end_mouse_operation(struct sway_seat *seat); 162void seat_end_mouse_operation(struct sway_seat *seat);
159 163
164void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,
165 uint32_t button, enum wlr_button_state state);
166
160#endif 167#endif