diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index e0f0db1d..52790039 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 | ||
1000 | struct seat_config *seat_get_config(struct sway_seat *seat) { | 1002 | struct 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 | ||
1014 | struct 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 | |||
1012 | void seat_begin_down(struct sway_seat *seat, struct sway_container *con, | 1026 | void 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; |
@@ -1038,6 +1052,17 @@ void seat_begin_move_floating(struct sway_seat *seat, | |||
1038 | cursor_set_image(seat->cursor, "grab", NULL); | 1052 | cursor_set_image(seat->cursor, "grab", NULL); |
1039 | } | 1053 | } |
1040 | 1054 | ||
1055 | void seat_begin_move_tiling_threshold(struct sway_seat *seat, | ||
1056 | struct sway_container *con, uint32_t button) { | ||
1057 | seat->operation = OP_MOVE_TILING_THRESHOLD; | ||
1058 | seat->op_container = con; | ||
1059 | seat->op_button = button; | ||
1060 | seat->op_target_node = NULL; | ||
1061 | seat->op_target_edge = 0; | ||
1062 | seat->op_ref_lx = seat->cursor->cursor->x; | ||
1063 | seat->op_ref_ly = seat->cursor->cursor->y; | ||
1064 | } | ||
1065 | |||
1041 | void seat_begin_move_tiling(struct sway_seat *seat, | 1066 | void seat_begin_move_tiling(struct sway_seat *seat, |
1042 | struct sway_container *con, uint32_t button) { | 1067 | struct sway_container *con, uint32_t button) { |
1043 | seat->operation = OP_MOVE_TILING; | 1068 | seat->operation = OP_MOVE_TILING; |
@@ -1206,4 +1231,8 @@ void seat_consider_warp_to_focus(struct sway_seat *seat) { | |||
1206 | } else { | 1231 | } else { |
1207 | cursor_warp_to_workspace(seat->cursor, focus->sway_workspace); | 1232 | cursor_warp_to_workspace(seat->cursor, focus->sway_workspace); |
1208 | } | 1233 | } |
1234 | if (seat->cursor->hidden){ | ||
1235 | cursor_unhide(seat->cursor); | ||
1236 | wl_event_source_timer_update(seat->cursor->hide_source, cursor_get_timeout(seat->cursor)); | ||
1237 | } | ||
1209 | } | 1238 | } |