aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-21 11:23:48 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-22 23:10:19 +1000
commit9df660ee3188386c907d8feb999636ce8d61d095 (patch)
treeeb9343b66221d664ac995995d7bcceb45d25ee94 /include/sway/input
parent6767d8a593723a9b69d018eed13d24a789be9516 (diff)
downloadsway-9df660ee3188386c907d8feb999636ce8d61d095.tar.xz
Store last button and use it when views request to move or resize
Diffstat (limited to 'include/sway/input')
-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 {
double op_ref_width, op_ref_height; // container's size at start of op
double op_ref_con_lx, op_ref_con_ly; // container's x/y at start of op
+ uint32_t last_button;
+ uint32_t last_button_serial;
+
struct wl_listener focus_destroy;
struct wl_listener new_container;
struct wl_listener new_drag_icon;
@@ -150,11 +153,15 @@ 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_move(struct sway_seat *seat, struct sway_container *con);
+void seat_begin_move(struct sway_seat *seat, struct sway_container *con,
+ uint32_t button);
void seat_begin_resize(struct sway_seat *seat, struct sway_container *con,
uint32_t button, enum wlr_edges edge);
void seat_end_mouse_operation(struct sway_seat *seat);
+void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,
+ uint32_t button, enum wlr_button_state state);
+
#endif