aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-27 00:32:15 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-30 14:17:24 +0100
commit4d88c957905e7f6b2c8188d218ca22b3e6986fe4 (patch)
tree5f34ad1667607315cfbcb786ce71845a36595d82 /sway/input/seat.c
parentVerify seat fallback settings on reload (diff)
downloadsway-4d88c957905e7f6b2c8188d218ca22b3e6986fe4.tar.gz
sway-4d88c957905e7f6b2c8188d218ca22b3e6986fe4.tar.zst
sway-4d88c957905e7f6b2c8188d218ca22b3e6986fe4.zip
hide_cursor: change to a seat subcommand
This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index e0f0db1d..fa82c9ce 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -995,6 +995,8 @@ void seat_apply_config(struct sway_seat *seat,
995 wl_list_for_each(seat_device, &seat->devices, link) { 995 wl_list_for_each(seat_device, &seat->devices, link) {
996 seat_configure_device(seat, seat_device->input_device); 996 seat_configure_device(seat, seat_device->input_device);
997 } 997 }
998
999 cursor_handle_activity(seat->cursor);
998} 1000}
999 1001
1000struct seat_config *seat_get_config(struct sway_seat *seat) { 1002struct seat_config *seat_get_config(struct sway_seat *seat) {
@@ -1009,6 +1011,18 @@ struct seat_config *seat_get_config(struct sway_seat *seat) {
1009 return NULL; 1011 return NULL;
1010} 1012}
1011 1013
1014struct seat_config *seat_get_config_by_name(const char *name) {
1015 struct seat_config *seat_config = NULL;
1016 for (int i = 0; i < config->seat_configs->length; ++i ) {
1017 seat_config = config->seat_configs->items[i];
1018 if (strcmp(name, seat_config->name) == 0) {
1019 return seat_config;
1020 }
1021 }
1022
1023 return NULL;
1024}
1025
1012void seat_begin_down(struct sway_seat *seat, struct sway_container *con, 1026void seat_begin_down(struct sway_seat *seat, struct sway_container *con,
1013 uint32_t button, double sx, double sy) { 1027 uint32_t button, double sx, double sy) {
1014 seat->operation = OP_DOWN; 1028 seat->operation = OP_DOWN;