mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Merge pull request #1699 from acrisci/seat-fixes
Seat fixes and cleanup
This commit is contained in:
commit
0c0cc79282
23 changed files with 248 additions and 194 deletions
|
|
@ -377,6 +377,7 @@ void free_config(struct sway_config *config);
|
|||
void config_clear_handler_context(struct sway_config *config);
|
||||
|
||||
void free_sway_variable(struct sway_variable *var);
|
||||
|
||||
/**
|
||||
* Does variable replacement for a string based on the config's currently loaded variables.
|
||||
*/
|
||||
|
|
@ -385,44 +386,68 @@ char *do_var_replacement(char *str);
|
|||
struct cmd_results *check_security_config();
|
||||
|
||||
int input_identifier_cmp(const void *item, const void *data);
|
||||
|
||||
struct input_config *new_input_config(const char* identifier);
|
||||
|
||||
void merge_input_config(struct input_config *dst, struct input_config *src);
|
||||
|
||||
struct input_config *copy_input_config(struct input_config *ic);
|
||||
|
||||
void free_input_config(struct input_config *ic);
|
||||
|
||||
void apply_input_config(struct input_config *input);
|
||||
|
||||
int seat_name_cmp(const void *item, const void *data);
|
||||
|
||||
struct seat_config *new_seat_config(const char* name);
|
||||
|
||||
void merge_seat_config(struct seat_config *dst, struct seat_config *src);
|
||||
|
||||
struct seat_config *copy_seat_config(struct seat_config *seat);
|
||||
|
||||
void free_seat_config(struct seat_config *ic);
|
||||
|
||||
struct seat_attachment_config *seat_attachment_config_new();
|
||||
|
||||
struct seat_attachment_config *seat_config_get_attachment(
|
||||
struct seat_config *seat_config, char *identifier);
|
||||
|
||||
void apply_seat_config(struct seat_config *seat);
|
||||
|
||||
int output_name_cmp(const void *item, const void *data);
|
||||
|
||||
void output_get_identifier(char *identifier, size_t len,
|
||||
struct sway_output *output);
|
||||
|
||||
struct output_config *new_output_config(const char *name);
|
||||
|
||||
void merge_output_config(struct output_config *dst, struct output_config *src);
|
||||
|
||||
void apply_output_config(struct output_config *oc,
|
||||
struct sway_container *output);
|
||||
|
||||
void free_output_config(struct output_config *oc);
|
||||
|
||||
int workspace_output_cmp_workspace(const void *a, const void *b);
|
||||
|
||||
int sway_binding_cmp(const void *a, const void *b);
|
||||
|
||||
int sway_binding_cmp_qsort(const void *a, const void *b);
|
||||
|
||||
int sway_binding_cmp_keys(const void *a, const void *b);
|
||||
|
||||
void free_sway_binding(struct sway_binding *sb);
|
||||
|
||||
struct sway_binding *sway_binding_dup(struct sway_binding *sb);
|
||||
|
||||
/* Bar stuff */
|
||||
void load_swaybars();
|
||||
|
||||
void invoke_swaybar(struct bar_config *bar);
|
||||
|
||||
void terminate_swaybg(pid_t pid);
|
||||
|
||||
struct bar_config *default_bar_config(void);
|
||||
|
||||
void free_bar_config(struct bar_config *bar);
|
||||
|
||||
/* Global config singleton. */
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ extern struct sway_input_manager *input_manager;
|
|||
struct sway_input_device {
|
||||
char *identifier;
|
||||
struct wlr_input_device *wlr_device;
|
||||
struct input_config *config;
|
||||
struct wl_list link;
|
||||
struct wl_listener device_destroy;
|
||||
};
|
||||
|
|
@ -27,30 +26,34 @@ struct sway_input_manager {
|
|||
struct wl_listener new_input;
|
||||
};
|
||||
|
||||
struct sway_input_manager *sway_input_manager_create(
|
||||
struct sway_server *server);
|
||||
struct sway_input_manager *input_manager_create(struct sway_server *server);
|
||||
|
||||
bool sway_input_manager_has_focus(struct sway_input_manager *input,
|
||||
bool input_manager_has_focus(struct sway_input_manager *input,
|
||||
struct sway_container *container);
|
||||
|
||||
void sway_input_manager_set_focus(struct sway_input_manager *input,
|
||||
void input_manager_set_focus(struct sway_input_manager *input,
|
||||
struct sway_container *container);
|
||||
|
||||
void sway_input_manager_configure_xcursor(struct sway_input_manager *input);
|
||||
void input_manager_configure_xcursor(struct sway_input_manager *input);
|
||||
|
||||
void sway_input_manager_apply_input_config(struct sway_input_manager *input,
|
||||
void input_manager_apply_input_config(struct sway_input_manager *input,
|
||||
struct input_config *input_config);
|
||||
|
||||
void sway_input_manager_apply_seat_config(struct sway_input_manager *input,
|
||||
void input_manager_apply_seat_config(struct sway_input_manager *input,
|
||||
struct seat_config *seat_config);
|
||||
|
||||
struct sway_seat *sway_input_manager_get_default_seat(
|
||||
struct sway_seat *input_manager_get_default_seat(
|
||||
struct sway_input_manager *input);
|
||||
|
||||
struct sway_seat *input_manager_get_seat(struct sway_input_manager *input,
|
||||
const char *seat_name);
|
||||
|
||||
/** Gets the last seat the user interacted with */
|
||||
/**
|
||||
* Gets the last seat the user interacted with
|
||||
*/
|
||||
struct sway_seat *input_manager_current_seat(struct sway_input_manager *input);
|
||||
|
||||
struct input_config *input_device_get_config(struct sway_input_device *device);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ struct sway_seat_device {
|
|||
struct sway_seat *sway_seat;
|
||||
struct sway_input_device *input_device;
|
||||
struct sway_keyboard *keyboard;
|
||||
struct seat_attachment_config *attachment_config;
|
||||
struct wl_list link; // sway_seat::devices
|
||||
};
|
||||
|
||||
|
|
@ -23,7 +22,6 @@ struct sway_seat_container {
|
|||
|
||||
struct sway_seat {
|
||||
struct wlr_seat *wlr_seat;
|
||||
struct seat_config *config;
|
||||
struct sway_cursor *cursor;
|
||||
struct sway_input_manager *input;
|
||||
|
||||
|
|
@ -38,28 +36,28 @@ struct sway_seat {
|
|||
struct wl_list link; // input_manager::seats
|
||||
};
|
||||
|
||||
struct sway_seat *sway_seat_create(struct sway_input_manager *input,
|
||||
struct sway_seat *seat_create(struct sway_input_manager *input,
|
||||
const char *seat_name);
|
||||
|
||||
void sway_seat_destroy(struct sway_seat *seat);
|
||||
void seat_destroy(struct sway_seat *seat);
|
||||
|
||||
void sway_seat_add_device(struct sway_seat *seat,
|
||||
void seat_add_device(struct sway_seat *seat,
|
||||
struct sway_input_device *device);
|
||||
|
||||
void sway_seat_configure_device(struct sway_seat *seat,
|
||||
void seat_configure_device(struct sway_seat *seat,
|
||||
struct sway_input_device *device);
|
||||
|
||||
void sway_seat_remove_device(struct sway_seat *seat,
|
||||
void seat_remove_device(struct sway_seat *seat,
|
||||
struct sway_input_device *device);
|
||||
|
||||
void sway_seat_configure_xcursor(struct sway_seat *seat);
|
||||
void seat_configure_xcursor(struct sway_seat *seat);
|
||||
|
||||
void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *container);
|
||||
void seat_set_focus(struct sway_seat *seat, struct sway_container *container);
|
||||
|
||||
void sway_seat_set_focus_warp(struct sway_seat *seat,
|
||||
void seat_set_focus_warp(struct sway_seat *seat,
|
||||
struct sway_container *container, bool warp);
|
||||
|
||||
struct sway_container *sway_seat_get_focus(struct sway_seat *seat);
|
||||
struct sway_container *seat_get_focus(struct sway_seat *seat);
|
||||
|
||||
/**
|
||||
* Return the last container to be focused for the seat (or the most recently
|
||||
|
|
@ -70,12 +68,14 @@ struct sway_container *sway_seat_get_focus(struct sway_seat *seat);
|
|||
* is destroyed, or focus moves to a container with children and we need to
|
||||
* descend into the next leaf in focus order.
|
||||
*/
|
||||
struct sway_container *sway_seat_get_focus_inactive(struct sway_seat *seat,
|
||||
struct sway_container *seat_get_focus_inactive(struct sway_seat *seat,
|
||||
struct sway_container *container);
|
||||
|
||||
struct sway_container *sway_seat_get_focus_by_type(struct sway_seat *seat,
|
||||
struct sway_container *seat_get_focus_by_type(struct sway_seat *seat,
|
||||
enum sway_container_type type);
|
||||
|
||||
void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config);
|
||||
void seat_apply_config(struct sway_seat *seat, struct seat_config *seat_config);
|
||||
|
||||
struct seat_config *seat_get_config(struct sway_seat *seat);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue