aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 3a3350e1..4e803efd 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -901,14 +901,15 @@ struct seat_config *seat_get_config(struct sway_seat *seat) {
901 return NULL; 901 return NULL;
902} 902}
903 903
904void seat_begin_move(struct sway_seat *seat, struct sway_container *con) { 904void seat_begin_move(struct sway_seat *seat, struct sway_container *con,
905 uint32_t button) {
905 if (!seat->cursor) { 906 if (!seat->cursor) {
906 wlr_log(WLR_DEBUG, "Ignoring move request due to no cursor device"); 907 wlr_log(WLR_DEBUG, "Ignoring move request due to no cursor device");
907 return; 908 return;
908 } 909 }
909 seat->operation = OP_MOVE; 910 seat->operation = OP_MOVE;
910 seat->op_container = con; 911 seat->op_container = con;
911 seat->op_button = BTN_LEFT; 912 seat->op_button = button;
912} 913}
913 914
914void seat_begin_resize(struct sway_seat *seat, struct sway_container *con, 915void seat_begin_resize(struct sway_seat *seat, struct sway_container *con,
@@ -951,3 +952,10 @@ void seat_end_mouse_operation(struct sway_seat *seat) {
951 seat->operation = OP_NONE; 952 seat->operation = OP_NONE;
952 seat->op_container = NULL; 953 seat->op_container = NULL;
953} 954}
955
956void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,
957 uint32_t button, enum wlr_button_state state) {
958 seat->last_button = button;
959 seat->last_button_serial = wlr_seat_pointer_notify_button(seat->wlr_seat,
960 time_msec, button, state);
961}