mirror of
https://github.com/swaywm/sway.git
synced 2025-11-18 06:59:48 -05:00
pointer_constraint: change to a seat subcommand
This changes the `pointer_constraint` command to be a subcommand of seat to allow for per-seat settings. The current implementation that is not a seat subcommand will only operate on the current seat and will segfault in the config due to `config->handler_context.seat` only being set at runtime. This also allows for the wildcard identifier to be used to alter the pointer constraint settings on all seats and allows for the setting to be merged with the rest of the seat config.
This commit is contained in:
parent
204e1f4712
commit
ebe5399ed6
10 changed files with 36 additions and 19 deletions
|
|
@ -135,6 +135,12 @@ struct seat_attachment_config {
|
|||
// TODO other things are configured here for some reason
|
||||
};
|
||||
|
||||
enum seat_config_allow_constrain {
|
||||
CONSTRAIN_DEFAULT, // the default is currently enabled
|
||||
CONSTRAIN_ENABLE,
|
||||
CONSTRAIN_DISABLE
|
||||
};
|
||||
|
||||
/**
|
||||
* Options for multiseat and other misc device configurations
|
||||
*/
|
||||
|
|
@ -143,7 +149,7 @@ struct seat_config {
|
|||
int fallback; // -1 means not set
|
||||
list_t *attachments; // list of seat_attachment configs
|
||||
int hide_cursor_timeout;
|
||||
bool allow_constrain;
|
||||
enum seat_config_allow_constrain allow_constrain;
|
||||
};
|
||||
|
||||
enum config_dpms {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue