diff options
author | 2018-07-21 11:23:48 +1000 | |
---|---|---|
committer | 2018-07-22 23:10:19 +1000 | |
commit | 9df660ee3188386c907d8feb999636ce8d61d095 (patch) | |
tree | eb9343b66221d664ac995995d7bcceb45d25ee94 /include/sway | |
parent | Prevent re-uploading the same cursor image multiple times (diff) | |
download | sway-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')
-rw-r--r-- | include/sway/input/seat.h | 9 |
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 | ||
151 | void drag_icon_update_position(struct sway_drag_icon *icon); | 154 | void drag_icon_update_position(struct sway_drag_icon *icon); |
152 | 155 | ||
153 | void seat_begin_move(struct sway_seat *seat, struct sway_container *con); | 156 | void seat_begin_move(struct sway_seat *seat, struct sway_container *con, |
157 | uint32_t button); | ||
154 | 158 | ||
155 | void seat_begin_resize(struct sway_seat *seat, struct sway_container *con, | 159 | void 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 | ||
158 | void seat_end_mouse_operation(struct sway_seat *seat); | 162 | void seat_end_mouse_operation(struct sway_seat *seat); |
159 | 163 | ||
164 | void 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 |