diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-31 22:58:52 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-31 22:58:52 -0500 |
commit | ebe5399ed6bfa59f5f5d289bf3d46b08f60787b3 (patch) | |
tree | ca0bff9d26283b0fa790855e7379e8da2e89166b /sway/input | |
parent | 204e1f47122d5a48865802dd1fb94fe0f05c2401 (diff) | |
download | sway-ebe5399ed6bfa59f5f5d289bf3d46b08f60787b3.tar.xz |
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 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index e51d3e38..106b1910 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -1458,7 +1458,7 @@ void handle_pointer_constraint(struct wl_listener *listener, void *data) { void sway_cursor_constrain(struct sway_cursor *cursor, struct wlr_pointer_constraint_v1 *constraint) { struct seat_config *config = seat_get_config(cursor->seat); - if (!config->allow_constrain) { + if (config->allow_constrain == CONSTRAIN_DISABLE) { return; } |