mirror of
https://github.com/swaywm/sway.git
synced 2026-04-02 07:15:50 -04:00
hide_cursor: change to a seat subcommand
This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
This commit is contained in:
parent
09bb71f650
commit
4d88c95790
14 changed files with 54 additions and 30 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue