aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c29
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,
wl_list_for_each(seat_device, &seat->devices, link) {
seat_configure_device(seat, seat_device->input_device);
}
+
+ cursor_handle_activity(seat->cursor);
}
struct seat_config *seat_get_config(struct sway_seat *seat) {
@@ -1009,6 +1011,18 @@ struct seat_config *seat_get_config(struct sway_seat *seat) {
return NULL;
}
+struct seat_config *seat_get_config_by_name(const char *name) {
+ struct seat_config *seat_config = NULL;
+ for (int i = 0; i < config->seat_configs->length; ++i ) {
+ seat_config = config->seat_configs->items[i];
+ if (strcmp(name, seat_config->name) == 0) {
+ return seat_config;
+ }
+ }
+
+ return NULL;
+}
+
void seat_begin_down(struct sway_seat *seat, struct sway_container *con,
uint32_t button, double sx, double sy) {
seat->operation = OP_DOWN;
@@ -1038,6 +1052,17 @@ void seat_begin_move_floating(struct sway_seat *seat,
cursor_set_image(seat->cursor, "grab", NULL);
}
+void seat_begin_move_tiling_threshold(struct sway_seat *seat,
+ struct sway_container *con, uint32_t button) {
+ seat->operation = OP_MOVE_TILING_THRESHOLD;
+ seat->op_container = con;
+ seat->op_button = button;
+ seat->op_target_node = NULL;
+ seat->op_target_edge = 0;
+ seat->op_ref_lx = seat->cursor->cursor->x;
+ seat->op_ref_ly = seat->cursor->cursor->y;
+}
+
void seat_begin_move_tiling(struct sway_seat *seat,
struct sway_container *con, uint32_t button) {
seat->operation = OP_MOVE_TILING;
@@ -1206,4 +1231,8 @@ void seat_consider_warp_to_focus(struct sway_seat *seat) {
} else {
cursor_warp_to_workspace(seat->cursor, focus->sway_workspace);
}
+ if (seat->cursor->hidden){
+ cursor_unhide(seat->cursor);
+ wl_event_source_timer_update(seat->cursor->hide_source, cursor_get_timeout(seat->cursor));
+ }
}