aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-31 22:58:52 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-31 22:58:52 -0500
commitebe5399ed6bfa59f5f5d289bf3d46b08f60787b3 (patch)
treeca0bff9d26283b0fa790855e7379e8da2e89166b /include/sway/config.h
parentRebase #1636 against current master (diff)
downloadsway-ebe5399ed6bfa59f5f5d289bf3d46b08f60787b3.tar.gz
sway-ebe5399ed6bfa59f5f5d289bf3d46b08f60787b3.tar.zst
sway-ebe5399ed6bfa59f5f5d289bf3d46b08f60787b3.zip
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.
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index e63b9895..43ea7778 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -135,6 +135,12 @@ struct seat_attachment_config {
135 // TODO other things are configured here for some reason 135 // TODO other things are configured here for some reason
136}; 136};
137 137
138enum seat_config_allow_constrain {
139 CONSTRAIN_DEFAULT, // the default is currently enabled
140 CONSTRAIN_ENABLE,
141 CONSTRAIN_DISABLE
142};
143
138/** 144/**
139 * Options for multiseat and other misc device configurations 145 * Options for multiseat and other misc device configurations
140 */ 146 */
@@ -143,7 +149,7 @@ struct seat_config {
143 int fallback; // -1 means not set 149 int fallback; // -1 means not set
144 list_t *attachments; // list of seat_attachment configs 150 list_t *attachments; // list of seat_attachment configs
145 int hide_cursor_timeout; 151 int hide_cursor_timeout;
146 bool allow_constrain; 152 enum seat_config_allow_constrain allow_constrain;
147}; 153};
148 154
149enum config_dpms { 155enum config_dpms {